Sha256: b726b052c95fbb8772f59412cdc6d3b6b9c69505a28ab43037cea6fb55b5a6af

Contents?: true

Size: 826 Bytes

Versions: 2

Compression:

Stored size: 826 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(:fas, :plus) %> New
  <%% end %>
</div>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
chaltron-1.0.5 lib/templates/erb/scaffold/index.html.erb
chaltron-1.0.4 lib/templates/erb/scaffold/index.html.erb