lib/generators/kube/themed/templates/index.html.haml
- model_class = <%= model_class %>
%h1= model_class.model_name.human.pluralize
%table.striped
%thead.thead-black
%tr
%th= model_class.human_attribute_name(:id)
<%- columns.each do |column| -%>
%th= model_class.human_attribute_name(:<%= column.name %>)
<%- end -%>
%th= model_class.human_attribute_name(:created_at)
%th Actions
%tbody
- @<%= plural_resource_name %>.each do |<%= resource_name %>|
%tr
%td= link_to <%= resource_name %>.id, <%= singular_controller_routing_path %>_path(<%= resource_name %>)
<%- columns.each do |column| -%>
%td= <%= resource_name %>.<%= column.name %>
<%- end -%>
%td=l <%= resource_name %>.created_at
%td
= link_to 'Edit', edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-small'
= link_to 'Destroy', <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :data => { :confirm => 'Are you sure?' }, :class => 'btn btn-small'
= link_to 'New', new_<%= singular_controller_routing_path %>_path, :class => 'btn'