2021-08-21 23:30:19 +00:00
|
|
|
<h1>Pinball Machines</h1>
|
|
|
|
|
2021-09-14 21:25:37 +00:00
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Edition</th>
|
2021-09-27 05:33:06 +00:00
|
|
|
<th>Delete</th>
|
2021-09-14 21:25:37 +00:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% @machines.each do |machine| %>
|
|
|
|
<tr>
|
|
|
|
<td><%= link_to machine.name, edit_machine_path(machine) %></td>
|
|
|
|
<td><%= machine.edition %></td>
|
2021-09-27 05:33:06 +00:00
|
|
|
<td><%= link_to "X", machine_path(machine),
|
|
|
|
method: :delete,
|
|
|
|
data: { confirm: "Are you sure?" } %></td>
|
2021-09-14 21:25:37 +00:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<hr>
|
2021-08-27 04:40:47 +00:00
|
|
|
<p><%= @machines.size %> available machines</p>
|
2021-09-14 21:25:37 +00:00
|
|
|
<%= link_to "+ Add Machine", new_machine_path %>
|