diff options
Diffstat (limited to 'app/views/machines/index.html.erb')
-rw-r--r-- | app/views/machines/index.html.erb | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/app/views/machines/index.html.erb b/app/views/machines/index.html.erb index 33e279b..5abd2c2 100644 --- a/app/views/machines/index.html.erb +++ b/app/views/machines/index.html.erb @@ -1,13 +1,22 @@ <h1>Pinball Machines</h1> + +<table> + <thead> + <th>Name</th> + <th>Edition</th> + </thead> + <tbody> + <% @machines.each do |machine| %> + <tr> + <td><%= link_to machine.name, edit_machine_path(machine) %></td> + <td><%= machine.edition %></td> + </tr> + <% end %> + </tbody> +</table> + +<hr> <p><%= @machines.size %> available machines</p> -<ul> - <% @machines.each do |machine| %> - <li> - <%= link_to machine.name, machine %> - </li> - <% end %> -</ul> - -<%= link_to "Add Machine", new_machine_path %> +<%= link_to "+ Add Machine", new_machine_path %> |