diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2010-03-28 14:44:34 +1100 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2010-03-28 14:44:34 +1100 |
commit | 2bcc2ebf44b59e46c104c92d621e8051c97bfcf5 (patch) | |
tree | d2a3f04fd3020c1b5d88847af62d52f2d5e5bd61 /activemodel/lib/active_model/errors.rb | |
parent | f5774e3e3f70a3acfa559b9ff889e9417fb71d4b (diff) | |
parent | 8398f21880a952769ccd6437a4344922fe596dab (diff) | |
download | rails-2bcc2ebf44b59e46c104c92d621e8051c97bfcf5.tar.gz rails-2bcc2ebf44b59e46c104c92d621e8051c97bfcf5.tar.bz2 rails-2bcc2ebf44b59e46c104c92d621e8051c97bfcf5.zip |
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'activemodel/lib/active_model/errors.rb')
-rw-r--r-- | activemodel/lib/active_model/errors.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb index d8320275df..a9a54a90e0 100644 --- a/activemodel/lib/active_model/errors.rb +++ b/activemodel/lib/active_model/errors.rb @@ -1,3 +1,4 @@ +require 'active_support/core_ext/array/wrap' require 'active_support/core_ext/string/inflections' require 'active_support/ordered_hash' @@ -206,7 +207,7 @@ module ActiveModel full_messages = [] each do |attribute, messages| - messages = Array(messages) + messages = Array.wrap(messages) next if messages.empty? if attribute == :base |