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