Sha256: 317a27446dad0f056487e0f4c7319cf5ce1e4748ab6d0325f6f39e404f1076ad

Contents?: true

Size: 907 Bytes

Versions: 8

Compression:

Stored size: 907 Bytes

Contents

<div class="page-header">
  <%%= link_to new_<%= singular_table_name %>_path, class: 'btn btn-primary' do %>
    <span class="glyphicon glyphicon-plus"></span>
    New <%= human_name %>
  <%% end %>
  <h1>Listing <%= plural_table_name %></h1>
</div>

<div class="table-responsive">
  <table class="table table-striped table-bordered table-hover">
    <thead>
      <tr>
    <% attributes.each do |attribute| -%>
        <th><%= attribute.human_name %></th>
    <% end -%>
        <th></th>
      </tr>
    </thead>

    <tbody>
      <%%= content_tag_for(:tr, @<%= plural_table_name %>) do |<%= singular_table_name %>| %>
    <% attributes.each do |attribute| -%>
        <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
    <% end -%>
        <td><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
      <%% end %>
    </tbody>
  </table>
</div>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
r5-0.3.0.0 lib/r5/template/lib/templates/erb/scaffold/index.html.erb
r5-0.2.6.2 lib/r5/template/lib/templates/erb/scaffold/index.html.erb
r5-0.2.6.1 lib/r5/template/lib/templates/erb/scaffold/index.html.erb
r5-0.2.6.0 lib/r5/template/lib/templates/erb/scaffold/index.html.erb
r5-0.2.5.2 lib/r5/template/lib/templates/erb/scaffold/index.html.erb
r5-0.2.5 lib/r5/template/lib/templates/erb/scaffold/index.html.erb
r5-0.2.4 lib/r5/template/lib/templates/erb/scaffold/index.html.erb
r5-0.2.3 lib/r5/template/lib/templates/erb/scaffold/index.html.erb