diff options
Diffstat (limited to 'railties/lib/rails/generators/erb')
-rw-r--r-- | railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb b/railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb index 0615a34a85..9b83207b3f 100644 --- a/railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb +++ b/railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb @@ -1,13 +1,14 @@ <%%= form_for(@<%= singular_name %>) do |f| %> <%% if @<%= singular_name %>.errors.any? %> - <div id="errorExplanation"> - <h2><%%= pluralize(@<%= singular_name %>.errors.count, "error") %> prohibited this <%= singular_name %> from being saved:</h2> - <ul> - <%% @<%= singular_name %>.errors.full_messages.each do |msg| %> - <li><%%= msg %></li> - <%% end %> - </ul> - </div> + <div id="error_explanation"> + <h2><%%= pluralize(@<%= singular_name %>.errors.count, "error") %> prohibited this <%= singular_name %> from being saved:</h2> + + <ul> + <%% @<%= singular_name %>.errors.full_messages.each do |msg| %> + <li><%%= msg %></li> + <%% end %> + </ul> + </div> <%% end %> <% for attribute in attributes -%> |