Sha256: d9a6f496f092d7a7d8a95712c3b37d37408cf2ee2d7914400025965950de4342

Contents?: true

Size: 1.29 KB

Versions: 1

Compression:

Stored size: 1.29 KB

Contents

<h1><%= plural_table_name.titleize %></h1>
<br />
<table class="u-full-width">
  <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, class: "button button-primary" %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
actionscaffold-0.3.5 lib/generators/scaffold_view/templates/skeleton/index.html.erb