%% if @<%= singular_table_name %>.errors.any? %>
<%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:
<%- @<%= singular_table_name %>.errors.full_messages.each do |msg| -%>
- <%= msg %>
<%- end -%>
<%% end %>
<%%= simple_form_for(@<%= singular_table_name %>, html: { class: 'form-horizontal' }) do |f| %>
<%- attributes.each do |attribute| -%>
<%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %>
<%- end -%>
<%%= f.button :submit, :value=> "#{f.object.new_record? ? "Create <%= singular_table_name %>" : "Update <%= singular_table_name %>"}", :class=>"btn btn-primary" %>
<%% end %>