Permalink
Browse files

Merge branch 'master' of https://github.com/nhocki/nifty-generators i…

…nto nhocki-master
  • Loading branch information...
2 parents 405b83d + 9dfa985 commit 4fa5d7ecd98f28b6e25d8fbb7d54e4459c6d7ce0 @ryanb committed Jan 24, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/generators/nifty/layout/templates/error_messages_helper.rb
@@ -2,8 +2,8 @@ module ErrorMessagesHelper
# Render error messages for the given objects. The :message and :header_message options are allowed.
def error_messages_for(*objects)
options = objects.extract_options!
- options[:header_message] ||= "Invalid Fields"
- options[:message] ||= "Correct the following errors and try again."
+ options[:header_message] ||= I18n.t(:"activerecord.errors.header", :default => "Invalid Fields")
+ options[:message] ||= I18n.t(:"activerecord.errors.message", :default => "Correct the following errors and try again.")
messages = objects.compact.map { |o| o.errors.full_messages }.flatten
unless messages.empty?
content_tag(:div, :class => "error_messages") do

0 comments on commit 4fa5d7e

Please sign in to comment.