<%%= form_tag(<%= plural_name %>_url, method: 'post', class: 'form-horizontal') do %> <% attributes.each do |attribute| -%>
<%%= label_tag :<%= attribute.name %>, nil, class: 'col-md-2 control-label' %>
<% if attribute.field_type == :date_select || attribute.field_type == :time_select || attribute.field_type == :datetime_select -%> <%%= text_field_tag :<%= attribute.name %>, nil, class: 'form-control' %> <% elsif attribute.field_type == :check_box -%> <%%= check_box_tag :<%= attribute.name %> %> <% else -%> <%%= <%= attribute.field_type %>_tag :<%= attribute.name %>, nil, class: 'form-control' %> <% end -%>
<% end -%>
<%%= submit_tag "Create <%= human_name.titleize %>", class: 'btn btn-primary' %>
<%% end %>