app/views/products/index.html.haml
%h1 Listing products
%table
%tr
%th Title
%th Description
%th Price
%th Retired
%th
%th
%th
- @products.each do |product|
%tr
%td= product.title
%td= product.description
%td= product.price
%td= product.retired
%td= link_to 'Show', product
%td= link_to 'Edit', edit_product_path(product)
%td= link_to 'Destroy', product, data: {confirm: 'Are you sure?'},
:method => :delete
%br
= link_to 'New Product', new_product_path