app/views/categories/index.html.haml
%h1 Listing categories
%table
%tr
%th Name
%th
%th
%th
- @categories.each do |category|
%tr
%td= category.name
%td= link_to 'Show', category
%td= link_to 'Edit', edit_category_path(category)
%td= link_to 'Destroy', category, data: {confirm: 'Are you sure?'},
:method => :delete
%br
= link_to 'New Category', new_category_path