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