<%%= form_for(@<%= singular_table_name %><% if options[:singleton] -%> , :url => <%= singular_table_name %>_path, :html => { :method => :put, :class => "edit_<%= singular_table_name %>", :id => "edit_<%= singular_table_name %>"}<% end -%> ) do |f| %> <%% if @<%= singular_table_name %>.errors.any? %>

<%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:

<%% end %> <% for attribute in attributes -%>
<%%= f.label :<%= attribute.name %> %>
<%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
<% end -%>
<% if options[:optimistic] && options[:timestamps] -%> <%%= f.hidden_field :updated_at %> <% end -%> <%%= f.submit %>
<%% end %>