tap/app/views/products/index.html.erb
2014-11-26 11:58:51 +01:00

11 lines
285 B
Text

<h1>All products</h1>
<ul class="products">
<% @products.each do |product| %>
<li>
<%= link_to product.name, product %> |
<%= link_to "delete", product, method: :delete,
data: { confirm: "You sure?" } %>
</li>
<% end %>
</ul>