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/machines/index.html.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/views/machines/index.html.erb') 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 @@

Pinball Machines

- + <% @machines.each do |machine| %> + <% end %> @@ -19,4 +22,3 @@

<%= @machines.size %> available machines

<%= link_to "+ Add Machine", new_machine_path %> - -- cgit 1.4.1
Name EditionDelete
<%= link_to machine.name, edit_machine_path(machine) %> <%= machine.edition %><%= link_to "X", machine_path(machine), + method: :delete, + data: { confirm: "Are you sure?" } %>