diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-11-04 11:35:01 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-11-04 11:35:01 -0200 |
commit | d9f20c575a29e8ec8eb549aae63b7c304dc27489 (patch) | |
tree | 1e8b7f8754a03ce7ba2c899dcf64e97072c41380 /activemodel | |
parent | f786469f54332458ed60a1bbefec3125afe5f64b (diff) | |
download | rails-d9f20c575a29e8ec8eb549aae63b7c304dc27489.tar.gz rails-d9f20c575a29e8ec8eb549aae63b7c304dc27489.tar.bz2 rails-d9f20c575a29e8ec8eb549aae63b7c304dc27489.zip |
Set hash value instead of using merge!
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/validations/validates.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/validations/validates.rb b/activemodel/lib/active_model/validations/validates.rb index 4651154934..1eb0716891 100644 --- a/activemodel/lib/active_model/validations/validates.rb +++ b/activemodel/lib/active_model/validations/validates.rb @@ -104,7 +104,7 @@ module ActiveModel raise ArgumentError, "You need to supply at least one attribute" if attributes.empty? raise ArgumentError, "You need to supply at least one validation" if validations.empty? - defaults.merge!(:attributes => attributes) + defaults[:attributes] = attributes validations.each do |key, options| next unless options |