<%%= render "page_header" do %> <%%= render "page_header_breadcrumb", title: "Showing <%= human_name.downcase %>" do %> <%% end %> <%%= render "page_header_actions" do %> <%%= link_to "Edit <%= human_name.downcase %>", <%= edit_helper(type: :path) %>, class: "btn btn-primary" %> <%%= button_to "Delete <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete, form_class: "d-inline", class: "btn btn-light", data: { confirm: "Are you sure ?" } %> <%% end %> <%% end %>

<%= human_name %> details

<% attributes.reject(&:password_digest?).each do |attribute| -%>
<%= attribute.human_name %>
<% if attribute.attachment? -%>
<%%= link_to <%= singular_name %>.<%= attribute.column_name %>.filename, <%= singular_name %>.<%= attribute.column_name %> if <%= singular_name %>.<%= attribute.column_name %>.attached? %>
<% elsif attribute.attachments? -%> <%% <%= singular_name %>.<%= attribute.column_name %>.each do |<%= attribute.singular_name %>| %>
<%%= link_to <%= attribute.singular_name %>.filename, <%= attribute.singular_name %> %>
<%% end %> <% else -%>
<%%= @<%= singular_name %>.<%= attribute.column_name %> %>
<% end -%> <% end -%>