<%= form_for [ :admin, resource ], html: { class: 'form-horizontal' } do |form| %> <% attributes = resource.attributes.delete_if do |k, v| k.to_sym.in? [ :id, :created_at, :updated_at ] end %> <% attributes.each do |key, val| %>
<%= form.label key, class: "col-sm-2 control-label" %>
<%= form.text_field key, class: "form-control", placeholder: resource_class.human_attribute_name(key) %>
<% end %>
<%= link_to "Cancel", [ :admin, resource_class ], class: "btn btn-danger" %>
<% end %>