From 848c59f15e83c0571be956726284d8d9180679b4 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Mon, 27 Sep 2021 01:33:06 -0400 Subject: add delete button to list views --- app/views/players/index.html.erb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/views/players/index.html.erb') diff --git a/app/views/players/index.html.erb b/app/views/players/index.html.erb index aea4252..31a84f1 100644 --- a/app/views/players/index.html.erb +++ b/app/views/players/index.html.erb @@ -1,11 +1,11 @@

Pinball Players

- + <% @players.order("strikes").each do |player| %> @@ -13,6 +13,9 @@ + <% end %> -- cgit 1.4.1
Name Paid StrikesDelete
<%= link_to player.name, edit_player_path(player) %> <% if player.paid %>✓<% end %> <%= player.strikes %><%= link_to "X", player_path(player), + method: :delete, + data: { confirm: "Are you sure?" } %>