<%%= form_for <%= item_path :instance_variable => true %> do |f| %> <%% if @<%= instance_name %>.errors.any? %>

<%%= pluralize(@<%= instance_name %>.errors.count, "error") %> prohibited this <%= instance_name %>from being saved:

<%% end %> <%- for attribute in model_attributes -%> <%- if attribute.name.match('_id') %> <%else %> <% end %> <%- end -%>
<%%= f.label :<%= attribute.name %> %><%%= f.select :<%= attribute.name %>,<%= attribute.name.split('_')[0].capitalize %>.all.collect{|var|[var.name,var.id]} %><%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>


<%%= f.submit "Submit" ,:style=>"margin:auto",:class=>"btn primary large"%> <%% end %>