Sha256: ea74d73db655460d5250271196b7831d54355f7ca5b804b1e7d7070fb36ceb93

Contents?: true

Size: 819 Bytes

Versions: 1

Compression:

Stored size: 819 Bytes

Contents

<h1>Listing <%= plural_table_name %></h1>

<table>
  <tr>
<% for attribute in attributes -%>
    <th><%= attribute.human_name %></th>
<% end -%>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
  <tr>
<% for attribute in attributes -%>
    <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
<% end -%>
    <td><%%= link_to 'Show', <%= singular_table_name %> %></td>
    <td><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
    <td><%%= link_to 'Destroy', <%= singular_table_name %>, <%= key_value :confirm, "'Are you sure?'" %>, <%= key_value :method, ":delete" %> %></td>
  </tr>
<%% end %>
</table>

<br />

<%%= link_to 'New <%= human_name %>', new_<%= singular_table_name %>_path %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
railties-3.1.0.beta1 lib/rails/generators/erb/scaffold/templates/index.html.erb