Sha256: 491a72ccf59e6d4ec65b0532c9557b7c7cc7779723c17d2ef335046927cf4e8b

Contents?: true

Size: 786 Bytes

Versions: 6

Compression:

Stored size: 786 Bytes

Contents

<div>
  <%%= link_to new_<%= singular_table_name %>_path, class: 'waves-effect waves-light btn' do %>
    New <%= human_name %>
  <%% end %>
  <h1>Listing <%= plural_table_name %></h1>
</div>

<div>
  <table class="bordered">
    <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

6 entries across 6 versions & 1 rubygems

Version Path
r5-0.5.0.0 lib/r5/template/lib/templates/erb/scaffold/index.html.erb
r5-0.4.0.5 lib/r5/template/lib/templates/erb/scaffold/index.html.erb
r5-0.4.0.4 lib/r5/template/lib/templates/erb/scaffold/index.html.erb
r5-0.4.0.2 lib/r5/template/lib/templates/erb/scaffold/index.html.erb
r5-0.4.0.1 lib/r5/template/lib/templates/erb/scaffold/index.html.erb
r5-0.4.0.0 lib/r5/template/lib/templates/erb/scaffold/index.html.erb