about summary refs log tree commit diff
path: root/app/views/players/index.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/players/index.html.erb')
-rw-r--r--app/views/players/index.html.erb5
1 files changed, 4 insertions, 1 deletions
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 @@
 <h1>Pinball Players</h1>
 
-
 <table>
   <thead>
     <th>Name</th>
     <th>Paid</th>
     <th>Strikes</th>
+    <th>Delete</th>
   </thead>
   <tbody>
     <% @players.order("strikes").each do |player| %>
@@ -13,6 +13,9 @@
         <td><%= link_to player.name, edit_player_path(player) %></td>
         <td><% if player.paid %>✓<% end %></td>
         <td><%= player.strikes %></td>
+        <td><%= link_to "X", player_path(player),
+          method: :delete,
+          data: { confirm: "Are you sure?" } %></td>
       </tr>
     <% end %>
   </tbody>