Sha256: d9cc0405c8c95b23ea119ef4cf348189cd4631db0aa29866f5b0f73c23e95462

Contents?: true

Size: 1.14 KB

Versions: 2

Compression:

Stored size: 1.14 KB

Contents

<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 %></td>
    <td><%= link_to "Edit", :action => "edit#{@scaffold_suffix}", :id => entry %></td>
    <td><%= link_to "Destroy", :action => "destroy#{@scaffold_suffix}", :id => entry, :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}" %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
actionpack-1.9.0 lib/action_controller/templates/scaffolds/list.rhtml
actionpack-1.9.1 lib/action_controller/templates/scaffolds/list.rhtml