Created
March 7, 2017 12:19
-
-
Save kethlinmil/056eea8d51967a738b91205594ff02f1 to your computer and use it in GitHub Desktop.
This file contains 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
<div> | |
<% editable_attributes.each do |attribute| -%> | |
<dl class="row"> | |
<dt class="col-sm-3"><%= attribute.human_name.titleize %>:</dt> | |
<dd class="col-sm-9"><%= "<%= @#{singular_name}.#{attribute.name} %%>" %></dd> | |
</dl> | |
<% end -%> | |
</div> | |
<p> | |
<%= "<%= link_to 'Edit', edit_#{singular_name}_path(@#{singular_name}), class: 'btn btn-sm btn-outline-info' %%>" %> | |
<%= "<%= link_to 'Destroy', #{singular_name}_path(@#{singular_name}), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-sm btn-outline-danger' %%>" %> | |
</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment