lib/templates/erb/scaffold/templates/_form.html.erb
<%% if @<%= file_name %>.errors.any? %>
<div id="error_explanation">
<h2><%%= pluralize(@<%= file_name %>.errors.count, "error") %> prohibited this <%= file_name %> from being saved:</h2>
<ul>
<%% @<%= file_name %>.errors.full_messages.each do |msg| %>
<li><%%= msg %></li>
<%% end %>
</ul>
</div>
<%% end %>
<% for attribute in attributes -%>
<div class="field">
<%%= f.label :<%= attribute.name %> %><br />
<%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
</div>
<% end -%>
<div class="actions">
<%%= f.submit %>
</div>