Sha256: 3a4bbd71a994d7c04b7c7889ed092d07263b3c8008bc091363f03e092bba0707

Contents?: true

Size: 1.27 KB

Versions: 3

Compression:

Stored size: 1.27 KB

Contents

<h1><%= plural_table_name.titleize %></h1>
<br />
<table class="table table-striped">
  <thead>
    <tr>
<% attributes.reject(&:password_digest?).each do |attribute| -%>
      <th><%= attribute.human_name %></th>
<% end -%>
      <th></th>
    </tr>
  </thead>
  <tfoot>
    <tr>
    </tr>
  </tfoot>
  <tbody>
    <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
      <tr>
<% attributes.reject(&:password_digest?).each do |attribute| -%>
        <td><%- if attribute.reference? %><%%= <%= singular_table_name %>.<%= attribute.name %>.name %>
      <% elsif  attribute.type == :boolean -%><%%= check_box_tag "<%= singular_table_name %>", <%= singular_table_name %>.<%= attribute.name %>, <%= singular_table_name %>.<%= attribute.name %> %><% else %><%%= <%= singular_table_name %>.<%= attribute.name %> %><% end -%></td>
<% end -%>
      <td>
        <%%= link_to 'Show', <%= singular_table_name %> %> /
        <%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %> /
        <%%= link_to 'Delete', <%= singular_table_name %>, method: :delete, data: { confirm: 'Are you sure?' } %>
      </td>
    </tr>
    <%% end %>
  </tbody>
</table>
<br>
<%%= link_to 'New <%= singular_table_name.titleize %>', new_<%= singular_table_name %>_path %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
actionscaffold-0.3.5 lib/generators/scaffold_view/templates/bootstrap/index.html.erb
actionscaffold-0.3.1 lib/generators/scaffold_view/templates/bootstrap/index.html.erb
actionscaffold-0.2.6.pre lib/generators/scaffold_view/templates/bootstrap/index.html.erb