mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Use pluralize to properly inflect the number of errors.
This commit is contained in:
parent
ee309d506c
commit
944637648c
1 changed files with 1 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue