Sha256: 6c2685290535ed08480c2054c177592895d5e50081ff8875720a8f9f7e74811a

Contents?: true

Size: 1.17 KB

Versions: 7

Compression:

Stored size: 1.17 KB

Contents

<h1 class="text-center"><%= plural_table_name.titleize %></h1>

<div class="text-center">
  <%%= link_to 'New <%= singular_table_name.titleize %>', new_<%= singular_table_name %>_path %>
</div>

<table>
  <thead>
    <tr>
<% attributes.reject(&:password_digest?).each do |attribute| -%>
      <th><%= attribute.human_name %></th>
<% end -%>
      <th colspan="3"></th>
    </tr>
  </thead>

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

<div class="text-center">
  <%%= paginate @<%= plural_table_name %> %>
</div>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
silmarails-0.3.4 lib/generators/silmarails/install/files/foundation/templates/erb/scaffold/index.html.erb
silmarails-0.3.2 lib/generators/silmarails/install/files/foundation/templates/erb/scaffold/index.html.erb
silmarails-0.3.1 lib/generators/silmarails/install/files/foundation/templates/erb/scaffold/index.html.erb
silmarails-0.3.0 lib/generators/silmarails/install/files/foundation/templates/erb/scaffold/index.html.erb
silmarails-0.2.2 lib/generators/silmarails/install/files/foundation/templates/erb/scaffold/index.html.erb
silmarails-0.2.1 lib/generators/silmarails/install/files/foundation/templates/erb/scaffold/index.html.erb
silmarails-0.2.0 lib/generators/silmarails/install/files/foundation/templates/erb/scaffold/index.html.erb