Sha256: 801092a67af8d6529b7d354c899ad91bcc2773efbda1bbdf8b3495ebf7dcb086

Contents?: true

Size: 821 Bytes

Versions: 4

Compression:

Stored size: 821 Bytes

Contents

<div class='container-fluid'>
  <h3 class='pt-4'><%= plural_table_name.titleize %></h3>
  <div class='row'>
    <%%= content_tag 'table', class: 'table table-striped datatable' do %>
      <thead>
        <tr><% attributes.each do |attribute| %>
          <th><%= attribute.name.humanize %></th><% end %>
        </tr>
      </thead>
      <tbody>
        <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
          <tr><% attributes.each do |attribute| %>
            <td><%%= link_to <%= singular_table_name %>.<%= attribute.name %>, <%= singular_table_name %> %></td><% end %>
          </tr>
        <%% end -%>
      </tbody>
    <%% end %>
  </div>
  <hr>
  <%%= link_to new_<%= singular_table_name %>_path, class: 'btn btn-primary btn-lg' do %>
    <%%= icon('plus') %> New
  <%% end %>
</div>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
chaltron-1.0.3 lib/templates/erb/scaffold/index.html.erb
chaltron-1.0.2 lib/templates/erb/scaffold/index.html.erb
chaltron-1.0.1 lib/templates/erb/scaffold/index.html.erb
chaltron-1.0.0 lib/templates/erb/scaffold/index.html.erb