diff options
author | José Valim <jose.valim@gmail.com> | 2010-04-10 12:45:17 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-04-10 12:45:28 +0200 |
commit | 944637648c9399391c6e790740a01eeeac620a5f (patch) | |
tree | 80e5a65f183a99d7b3492b444fdc4ea99cf29eeb | |
parent | ee309d506c18dfac0608309d889810926f154cbb (diff) | |
download | rails-944637648c9399391c6e790740a01eeeac620a5f.tar.gz rails-944637648c9399391c6e790740a01eeeac620a5f.tar.bz2 rails-944637648c9399391c6e790740a01eeeac620a5f.zip |
Use pluralize to properly inflect the number of errors.
-rw-r--r-- | railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb | 2 |
1 files changed, 1 insertions, 1 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 b0222b24e4..0615a34a85 100644 --- a/railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb +++ b/railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb @@ -1,7 +1,7 @@ <%%= form_for(@<%= singular_name %>) do |f| %> <%% if @<%= singular_name %>.errors.any? %> <div id="errorExplanation"> - <h2>The following errors prohibited this form from being saved:</h2> + <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> |