Created
January 5, 2017 21:44
-
-
Save jordanhudgens/2023f69b3a16d13c86d57091eec39fe9 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