<%%= form_for [:admin, @<%=module_name_formatted.singularize%>], :html => {:class => 'form-horizontal'} do |f| %> <%%= error_messages_for(f.object) %>
Details <%attributes.each do |attribute|%> <%attribute_args = attribute.split(":")%>
<%%= f.label :<%=attribute_args[0]%>, :class => "control-label" %>
<%= field_for_attribute(attribute_args[1], attribute_args[0]) %>
<%end%>
<%%= f.submit "Save <%=module_name_formatted.singularize.humanize.titlecase%>", :class => "btn btn-primary form-btn", "data-loading-text" => "Saving..." %> or <%%= link_to "Cancel", admin_<%= module_name_formatted %>_path, :class => "btn" %>
<%% end %>