From 14de1a9597b35df43aeb03ad91aadb098b1a4d01 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 8 Jun 2009 19:30:12 -0700 Subject: each yields per message not per attribute --- activemodel/lib/active_model/errors.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activemodel/lib/active_model/errors.rb') 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 -- cgit v1.2.3