diff options
-rwxr-xr-x | activerecord/lib/active_record/validations.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index 2ae4edbb2d..0ae764936d 100755 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -350,10 +350,12 @@ module ActiveRecord @errors.each_key do |attr| @errors[attr].each do |msg| + next if msg.nil? + if attr == "base" full_messages << msg else - full_messages << @base.class.human_attribute_name(attr) + " " + msg unless msg.nil? + full_messages << @base.class.human_attribute_name(attr) + " " + msg end end end |