1
0
Fork 0
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:
José Valim 2010-04-10 12:45:17 +02:00
parent ee309d506c
commit 944637648c

View file

@ -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>