<%- attributes.each do |attribute| -%> <%- if @beautiful_attributes.include?(attribute.name + ':richtext') then -%>
<%%= f.label :<%= attribute.name %>, t(:<%= attribute.name %>, :default => "<%= attribute.name %>") %> <%%= f.text_area :<%= attribute.name %>, :class => "richtext-editor" %>
<% for type in richtext_type %> <%% hashradio = {:id => "<%= attribute.name %>-<%= type %>", :class => "select-richtext", 'data-editor' => 'markItUp<%= singular_table_name.capitalize %>_<%= attribute.name.downcase %>', 'data-spleditor' => '<%= singular_table_name %>_<%= attribute.name %>' } %> <%% hashradio[:checked] = "checked" if @<%= singular_table_name %>.<%= attribute.name %>_typetext == "<%= type %>" %> <%%= f.radio_button :<%= attribute.name %>_typetext, "<%= type %>", hashradio %> <% end %>
<%% rttype = @<%= singular_table_name %>.<%= attribute.name %>_typetext.to_s %> <%% if not rttype.blank? then %> <%% end %> <%- elsif @beautiful_attributes.include?(attribute.name + ':references') then -%>
<%%= f.label :<%= attribute.name %>, t(:<%= attribute.name %>, :default => "<%= attribute.name %>") %> <%%= f.collection_select :<%= attribute.name %>_id, <%= attribute.name.camelcase %>.all, :id, :caption %>
<%- else -%>
<%%= f.label :<%= attribute.name %>, t(:<%= attribute.name %>, :default => "<%= attribute.name %>") %> <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
<%- end -%> <%- end -%>