diff options
Diffstat (limited to 'app/views/machines/index.html.erb')
-rw-r--r-- | app/views/machines/index.html.erb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/views/machines/index.html.erb b/app/views/machines/index.html.erb index 5abd2c2..f099ea6 100644 --- a/app/views/machines/index.html.erb +++ b/app/views/machines/index.html.erb @@ -1,16 +1,19 @@ <h1>Pinball Machines</h1> - <table> <thead> <th>Name</th> <th>Edition</th> + <th>Delete</th> </thead> <tbody> <% @machines.each do |machine| %> <tr> <td><%= link_to machine.name, edit_machine_path(machine) %></td> <td><%= machine.edition %></td> + <td><%= link_to "X", machine_path(machine), + method: :delete, + data: { confirm: "Are you sure?" } %></td> </tr> <% end %> </tbody> @@ -19,4 +22,3 @@ <hr> <p><%= @machines.size %> available machines</p> <%= link_to "+ Add Machine", new_machine_path %> - |