Sha256: 5c0acf2171b549c32405447e556346f9fe5e9f349fb7f6f01ea571a95b234a0f

Contents?: true

Size: 1.02 KB

Versions: 5

Compression:

Stored size: 1.02 KB

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 %>.<%= nested_parent_name %>, <%= singular_table_name %>] %></td>
    <td><%%= link_to 'Edit', edit_<%= nested_parent_name %>_<%= singular_table_name %>_path(<%= singular_table_name %>.<%= nested_parent_name %>, <%= singular_table_name %>) %></td>
    <td><%%= link_to 'Destroy', [<%= singular_table_name %>.<%= nested_parent_name %>, <%= singular_table_name %>], :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<%% end %>
</table>

<br />

<%%= link_to 'New <%= human_name %>', new_<%= nested_parent_name %>_<%= singular_table_name %>_path(params[:<%= nested_parent_name %>_id]) %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
nested_scaffold-1.0.0 lib/generators/erb/templates/index.html.erb
nested_scaffold-0.2.1 lib/generators/erb/templates/index.html.erb
nested_scaffold-0.2.0 lib/generators/erb/templates/index.html.erb
nested_scaffold-0.1.0 lib/generators/erb/templates/index.html.erb
nested_scaffold-0.0.1 lib/generators/erb/templates/index.html.erb