Listing <%= plural_table_name %>

<% for attribute in attributes -%> <% end -%> <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %> <% for attribute in attributes -%> <% end -%> <%% if allowed?(:<%= table_name %>, :show) %> <%% end %> <%% if allowed?(:<%= table_name %>, :update) %> <%% end %> <%% if allowed?(:<%= table_name %>, :destroy) %> <%% end %> <%% end %>
<%= attribute.human_name %>
<%%= <%= singular_table_name %>.<%= attribute.name %> %><%%= link_to 'Show', <%= singular_table_name %> %><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %><%%= link_to 'Destroy', <%= singular_table_name %>, :confirm => 'Are you sure?', :method => :delete %>

<%% if allowed?(:<%= table_name %>, :create) %> <%%= link_to 'New <%= human_name %>', new_<%= singular_table_name %>_path %> <%% end %>