%%= form_for <%= item_path :instance_variable => true %> do |f| %> <%% if @<%= instance_name %>.errors.any? %>
<%%= f.label :<%= attribute.name %> %> | <%- if attribute.name.match('_id') %><%%= f.select :<%= attribute.name %>,<%= attribute.name.split('_')[0].capitalize %>.all.collect{|var|[var.name,var.id]} %> | <%else %><%%= f.<%= attribute.field_type %> :<%= attribute.name %> %> | <% end %>