blob: 233e9da87d8145c8296a9bfd369265dea073db4d (
plain) (
blame)
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 <%= @scaffold_plural_name %></h1>
<table>
<tr>
<% for column in @scaffold_class.content_columns %>
<th><%= column.human_name %></th>
<% end %>
</tr>
<% for entry in instance_variable_get("@#{@scaffold_plural_name}") %>
<tr>
<% for column in @scaffold_class.content_columns %>
<td><%= entry.send(column.name) %></td>
<% end %>
<td><%= link_to "Show", :action => "show#{@scaffold_suffix}", :id => entry.id %></td>
<td><%= link_to "Edit", :action => "edit#{@scaffold_suffix}", :id => entry.id %></td>
<td><%= link_to "Destroy", :action => "destroy#{@scaffold_suffix}", :id => entry.id, :confirm => "Are you sure?" %></td>
</tr>
<% end %>
</table>
<%= link_to "Previous page", { :page => instance_variable_get("@#{@scaffold_singular_name}_pages").current.previous } if instance_variable_get("@#{@scaffold_singular_name}_pages").current.previous %>
<%= link_to "Next page", { :page => instance_variable_get("@#{@scaffold_singular_name}_pages").current.next } if instance_variable_get("@#{@scaffold_singular_name}_pages").current.next %>
<br />
<%= link_to "New #{@scaffold_singular_name}", :action => "new#{@scaffold_suffix}" %>
|