Sha256: 02ff78d918ec36f48418fa2e2cffb9e9567e8e25244e6e4aed98aab8bc1f44f0

Contents?: true

Size: 1019 Bytes

Versions: 1

Compression:

Stored size: 1019 Bytes

Contents

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

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

  <tbody>
<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
    <tr>
<% attributes.each do |attribute| -%>
      <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
<% end -%>
      <td><%%= link_to 'Show', <%= singular_table_name %> %></td>
      <td><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
      <td><%%= link_to 'Destroy', <%= singular_table_name %>, data: { confirm: 'Are you sure?' }, method: :delete %></td>
    </tr>
<%% end %>
  </tbody>
</table>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bootstrap-generators-2.3.2 lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/index.html.erb