Permalink
Browse files

provide more useful feedback on missing translations for validation e…

…rror messages
  • Loading branch information...
1 parent 906e793 commit e3ecc3375fef4faa807638ff9e9cf309094272bd Sven Fuchs committed Aug 13, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/validations.rb
@@ -70,7 +70,7 @@ def generate_message(attr, key, options = {})
msgs << options[:default] if options[:default]
msgs << key
- I18n.t nil, options.merge(:default => msgs, :scope => [:active_record, :error_messages])
+ I18n.t msgs.shift, options.merge(:default => msgs, :scope => [:active_record, :error_messages])
end
# Returns true if the specified +attribute+ has errors associated with it.

0 comments on commit e3ecc33

Please sign in to comment.