2014-11-25 13:09:55 +01:00
|
|
|
<h1>All products</h1>
|
|
|
|
|
|
|
|
<ul class="products">
|
|
|
|
<% @products.each do |product| %>
|
|
|
|
<li>
|
2014-11-26 11:58:51 +01:00
|
|
|
<%= link_to product.name, product %> |
|
|
|
|
<%= link_to "delete", product, method: :delete,
|
|
|
|
data: { confirm: "You sure?" } %>
|
2014-11-25 13:09:55 +01:00
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|