%- attributes.each do |attribute| -%>
<%- if @beautiful_attributes.include?(attribute.name + ':wysiwyg') then -%>
<%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
<%%= f.text_area :<%= attribute.name %>, :class => "wysiwyg-editor form-control" %>
<%%= f.hidden_field :<%= attribute.name %>_typetext, :value => "html" %>
<%- elsif @beautiful_attributes.include?(attribute.name + ':references') then -%>
<%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
<%%= f.collection_select :<%= attribute.name %>_id, <%= attribute.name.camelcase %>.all, :id, :caption, { :include_blank => true }, { :class => "form-control" } %>
<%- elsif @beautiful_attributes.include?(attribute.name + ':price') then -%>
<%- elsif @beautiful_attributes.include?(attribute.name + ':date') then -%>
<%- elsif @beautiful_attributes.include?(attribute.name + ':datetime') then -%>
<%- elsif @beautiful_attributes.include?(attribute.name + ':color') then -%>
<%- else -%>
<%%= f.label :<%= attribute.name %>, <%= i18n_t_a(singular_table_name, attribute.name) %>.capitalize, :class => "control-label" %>
<%%= f.<%= attribute.field_type %> :<%= attribute.name %><%= ', :rows => 5' if attribute.field_type == :text_area %>, :class => "form-control" %>
<%- end -%>
<%- end -%>