Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 2c5a2e7f2e45207a204cf97a99445b2c2823e5e6 1 parent 9b45e09
@dhh dhh authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 activerecord/lib/active_record/validations.rb
View
4 activerecord/lib/active_record/validations.rb
@@ -350,10 +350,12 @@ def full_messages
@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

0 comments on commit 2c5a2e7

Please sign in to comment.
Something went wrong with that request. Please try again.