Sha256: 0162a74b4bf718683a56b288959a18fa6787331ffcfd716232c3b868fb4ddae2
Contents?: true
Size: 1.61 KB
Versions: 1
Compression:
Stored size: 1.61 KB
Contents
<% byebug %> <main class="mdl-layout__content"> <h2> <%= plural_table_name.titleize %> </h2> <table class="mdl-data-table mdl-js-data-table mdl-data-table--selectable mdl-shadow--2dp"> <thead> <tr> <% attributes.reject(&:password_digest?).each do |attribute| -%> <th><%= attribute.human_name %></th> <% end -%> <th></th> </tr> </thead> <tbody> <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %> <tr> <% attributes.reject(&:password_digest?).each do |attribute| -%> <td class="mdl-data-table__cell--non-numeric"> <%%= link_to <%= singular_table_name %>.<%= attribute.name %>, <%= model_resource_name %> %> </td> <% end -%> <td> <%%= link_to edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: 'mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon' do %> <%%= material_icon :edit %> <%% end %> <%%= link_to <%= model_resource_name %>, class: 'mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon', method: :delete, data: { confirm: 'Are you sure?' } do %> <%%= material_icon :delete %> <%% end %> </td> </tr> <%% end %> </tbody> <tfoot> <tr> <td colspan="<%= attributes.reject(&:password_digest?).length + 1 %>"> <%%= link_to 'New <%= singular_table_name.titleize %>', new_<%= singular_route_name %>_path, class: 'mdl-button mdl-js-button mdl-js-ripple-effect' %> </td> </tr> </tfoot> </table> </div> </main>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
material-rails-0.1.0 | lib/material/generators/views/templates/index.html.erb |