Sha256: cbfa231b6283b1fc6941835d36efb819c9770b0f074d36ceecbb203bb9f38ba8

Contents?: true

Size: 1.35 KB

Versions: 92

Compression:

Stored size: 1.35 KB

Contents

<div class="container mx-auto my-8 px-4">
  <h1 class="text-4xl mb-2"><%= plural_table_name.titleize %></h1>
  <%% if @<%= plural_table_name %>.exists? %>
  <div class="bg-white rounded shadow p-3">
    <table class="w-full">
      <thead>
      <tr>
        <% attributes.reject(&:password_digest?).each do |attribute| -%>
        <th class="p-3 uppercase text-left text-xs text-gray-700"><%= attribute.human_name %></th>
        <% end -%>
        <th class="p-3 uppercase text-left text-xs text-gray-700">Actions</th>
      </tr>
      </thead>
      <tbody>
      <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
      <tr class="group border-t border-gray-400 hover:bg-gray-100">
        <% attributes.reject(&:password_digest?).each do |attribute| -%>
        <td class="p-3"><%%= <%= singular_table_name %>.<%= attribute.column_name %> %></td>
        <% end -%>
        <td>
          <%%= link_to "View", <%= singular_table_name %>, class: "btn btn-default" %>
          <%%= link_to "Edit", edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: "btn
          btn-default" %>
        </td>
      </tr>
      <%% end %>
      </tbody>
    </table>
  </div>
  <%% end %>
  <div class="mt-4">
    <%%= link_to 'New <%= singular_table_name.titleize %>', new_<%= singular_route_name %>_path, class: "btn btn-default" %>
  </div>
</div>

Version data entries

92 entries across 92 versions & 2 rubygems

Version Path
rails_app_generator-0.1.19 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.18 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.17 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.16 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.15 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.14 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.13 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.12 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.11 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.10 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.9 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.8 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.7 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.6 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.5 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.4 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.3 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.2 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.1 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.1.0 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb