Editing <%= singular_name %>

<%% form_for(@<%= singular_name %>, :html => { :multipart => true }) do |f| %> <%%= f.error_messages %> <% for attribute in attributes -%>

<%%= f.label :<%= attribute.name %> %>
<%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>

<% end -%> <% for attachment in attachments -%>

<%%= f.label :<%= attachment%> %>
<%%= f.file_field :<%= attachment%> %>

<% end -%>

<%%= f.submit 'Update' %>

<%% end %> <%%= link_to 'Show', @<%= singular_name %> %> | <%%= link_to 'Back', <%= plural_name %>_path %>