aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-06-08 19:30:12 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-06-08 19:37:51 -0700
commit14de1a9597b35df43aeb03ad91aadb098b1a4d01 (patch)
tree3bef04c62a37d8386cd76e6c828d48db3acf4757 /activemodel
parente1f679a020be4dcf2052111bcab833e28e0bc15e (diff)
downloadrails-14de1a9597b35df43aeb03ad91aadb098b1a4d01.tar.gz
rails-14de1a9597b35df43aeb03ad91aadb098b1a4d01.tar.bz2
rails-14de1a9597b35df43aeb03ad91aadb098b1a4d01.zip
each yields per message not per attribute
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/errors.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb
index 61bf4a81b8..2e643f108f 100644
--- a/activemodel/lib/active_model/errors.rb
+++ b/activemodel/lib/active_model/errors.rb
@@ -96,6 +96,7 @@ module ActiveModel
full_messages = []
each do |attribute, messages|
+ messages = Array.wrap(messages)
next if messages.empty?
if attribute == :base