Forked from jordanhudgens/override_index_sample.html.erb
Created
September 6, 2018 18:11
-
-
Save LogaJ/95dcf2e243b3a562f013a9dc33f08ee1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h2><%= plural_table_name.titleize %></h2> | |
<p id="notice"><%%= notice %></p> | |
<hr> | |
<div> | |
<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %> | |
<div class="content"> | |
<% attributes.reject(&:password_digest?).each do |attribute| -%> | |
<p><%%= <%= singular_table_name %>.<%= attribute.name %> %></p> | |
<% end -%> | |
<p><%%= link_to 'Show', <%= singular_table_name %> %></p> | |
<p><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></p> | |
<p><%%= link_to 'Delete', <%= singular_table_name %>, method: :delete, data: { confirm: 'Are you sure?' } %></p> | |
</div> | |
<%% end %> | |
</div> | |
<br> | |
<%%= link_to 'Create a New <%= singular_table_name.titleize %>', new_<%= singular_table_name %>_path %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment