Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (22 sloc) 1.13 kb
<h1>Listing <%= plural_name %></h1>
<table>
<tr>
<%% for column in <%= model_name %>.content_columns %>
<th><%%= column.human_name %></th>
<%% end %>
</tr>
<%% for <%= singular_name %> in @<%= plural_name %> %>
<tr>
<%% for column in <%= model_name %>.content_columns %>
<td><%%=h <%= singular_name %>.send(column.name) %></td>
<%% end %>
<td><%%= link_to 'Show', :action => 'show<%= suffix %>', :id => <%= singular_name %> %></td>
<td><%%= link_to 'Edit', :action => 'edit<%= suffix %>', :id => <%= singular_name %> %></td>
<td><%%= link_to 'Destroy', { :action => 'destroy<%= suffix %>', :id => <%= singular_name %> }, :post => true, :confirm => 'Are you sure you want to destroy this <%= singular_name %>?' %>
</tr>
<%% end %>
</table>
<%%= link_to 'Previous page', { :page => @<%= singular_name %>_pages.current.previous } if @<%= singular_name %>_pages.current.previous %>
<%%= link_to 'Next page', { :page => @<%= singular_name %>_pages.current.next } if @<%= singular_name %>_pages.current.next %>
<br />
<%%= link_to 'New <%= singular_name %>', :action => 'new<%= suffix %>' %>
Jump to Line
Something went wrong with that request. Please try again.