blob: 65c7e61cef4f64827493426f5cd54d85aad3f1a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<h1>Listing herds</h1>
<table>
<tr>
<% for column in Herd.content_columns %>
<th><%= column.human_name %></th>
<% end %>
</tr>
<% for herd in @herds %>
<tr>
<% for column in Herd.content_columns %>
<td><%=h herd.send(column.name) %></td>
<% end %>
<td><%= link_to 'Show', :action => 'show', :id => herd %></td>
<td><%= link_to 'Edit', :action => 'edit', :id => herd %></td>
<td><%= link_to 'Destroy', { :action => 'destroy', :id => herd }, :confirm => 'Are you sure?', :method => :post %></td>
</tr>
<% end %>
</table>
<%= link_to 'Previous page', { :page => @herd_pages.current.previous } if @herd_pages.current.previous %>
<%= link_to 'Next page', { :page => @herd_pages.current.next } if @herd_pages.current.next %>
<br />
<%= link_to 'Load from XML', :action => 'load_from_xml' %>
|