diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-13 19:25:33 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-13 19:25:33 +0000 |
commit | 2c5a2e7f2e45207a204cf97a99445b2c2823e5e6 (patch) | |
tree | 47987dc38cef2be0d94e4a374b32acd9ca6aef7d /activerecord | |
parent | 9b45e09b2a5c0c24457485f6ee5293416262570a (diff) | |
download | rails-2c5a2e7f2e45207a204cf97a99445b2c2823e5e6.tar.gz rails-2c5a2e7f2e45207a204cf97a99445b2c2823e5e6.tar.bz2 rails-2c5a2e7f2e45207a204cf97a99445b2c2823e5e6.zip |
Extended no inclusion of messages if theyre nil to base
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@144 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-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 |