diff options
author | Ryan Garver <ragarver@gmail.com> | 2012-10-04 08:13:12 -0700 |
---|---|---|
committer | Ryan Garver <ragarver@gmail.com> | 2012-10-04 08:13:12 -0700 |
commit | 1f3a8c873ed9b3fc8eb41ae775a570b95ebdf715 (patch) | |
tree | 7dad02bf5f727d327fae9ccac1c2007dc4641be1 /activemodel/lib | |
parent | 4cb50a3f571234b1202f9a0dffe39b445ecf807d (diff) | |
parent | d7d228402efd1ddbbdb2b15d2e91ec22693b9298 (diff) | |
download | rails-1f3a8c873ed9b3fc8eb41ae775a570b95ebdf715.tar.gz rails-1f3a8c873ed9b3fc8eb41ae775a570b95ebdf715.tar.bz2 rails-1f3a8c873ed9b3fc8eb41ae775a570b95ebdf715.zip |
Merge branch 'master' into feature/public-fragment_name_with_digest
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/validations.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb index 4762f39044..243d911f71 100644 --- a/activemodel/lib/active_model/validations.rb +++ b/activemodel/lib/active_model/validations.rb @@ -188,9 +188,9 @@ module ActiveModel # # #<ActiveModel::Validations::InclusionValidator:0x007fe603bb8780 @attributes=[:age], @options={:in=>0..99}> # # ] def validators_on(*attributes) - attributes.map do |attribute| + attributes.flat_map do |attribute| _validators[attribute.to_sym] - end.flatten + end end # Returns +true+ if +attribute+ is an attribute method, +false+ otherwise. |