<h1>Listing <%= plural_name.titleize %></h1>

<table>
  <tr>
<% for attribute in attributes -%>
    <th><%= attribute.column.human_name %></th>
<% end -%>
  </tr>
  <%%- @<%= plural_name %>.each do |<%= singular_name %>|%>
    <tr>
    <%- for attribute in attributes -%>
      <td><%%=h <%= singular_name %>.<%= attribute.name %> %></td>
    <%- end -%>    
      <td><%%=link_to 'Show', object_url(<%= singular_name %>) %></td>
      <td><%%=link_to 'Edit', edit_object_url(<%= singular_name %>) %></td>
      <td><%%=link_to 'Destroy', object_url(<%= singular_name %>), :confirm => 'Are you sure?', :method => :delete %></td>
    </tr>
  <%% end %>
</table>
<br/>

<%%= link_to 'New <%= singular_name.titleize %>', new_object_url %>