Skip to content

Commit

Permalink
Extended no inclusion of messages if theyre nil to base
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@144 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Dec 13, 2004
1 parent 9b45e09 commit 2c5a2e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion activerecord/lib/active_record/validations.rb
Expand Up @@ -350,10 +350,12 @@ def full_messages


@errors.each_key do |attr| @errors.each_key do |attr|
@errors[attr].each do |msg| @errors[attr].each do |msg|
next if msg.nil?

if attr == "base" if attr == "base"
full_messages << msg full_messages << msg
else 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 end
end end
Expand Down

0 comments on commit 2c5a2e7

Please sign in to comment.