32 lines
695 B
Plaintext
32 lines
695 B
Plaintext
<p id="notice"><%= notice %></p>
|
|
|
|
<h1>Products</h1>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
<th>Price</th>
|
|
<th colspan="3"></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% @products.each do |product| %>
|
|
<tr>
|
|
<td><%= product.name %></td>
|
|
<td><%= product.description %></td>
|
|
<td><%= product.price %></td>
|
|
<td><%= link_to 'Show', product %></td>
|
|
<td><%= link_to 'Edit', edit_product_path(product) %></td>
|
|
<td><%= link_to 'Destroy', product, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
<%= link_to 'New Product', new_product_path %>
|