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.3.6 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.3.5 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.3.4 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.3.3 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.3.2 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.3.1 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.3.0 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.2.43 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.2.42 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.2.41 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.2.40 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.2.39 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.2.38 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.2.37 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.2.36 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.2.35 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.2.34 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.2.33 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.2.32 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb
rails_app_generator-0.2.31 templates/addons/scaffold/lib/templates/erb/scaffold/index.html.erb