<%%= form_tag(<%= singular_table_name %>_url(@<%= singular_table_name %>), method: 'patch', class: 'form-horizontal') do %> <% attributes.each do |attribute| -%>
<%%= label_tag :<%= attribute.name %>, nil, class: 'col-md-2 control-label' %> <% colsize = 6 colsize = 2 if attribute.type == :integer %>
<%%= <%= attribute.field_type %>_tag :<%= attribute.name %>, @<%= singular_table_name %>.<%= attribute.name %><%= "?" if attribute.type == :boolean %>, class: 'form-control'%>
<% end %>
<%%= submit_tag "Update <%= human_name.titleize %>", class: 'btn btn-primary' %>
<%% end %>