aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2015-09-01 08:46:56 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2015-09-01 08:53:29 -0300
commit8ce0fdb5c412a5083dff3ecb863e86c1853651d7 (patch)
treefa3e7cd501232eadbd39b5e68a3ab7c2153852b5 /activemodel
parentfbce0f8995089caf8db5e74fd2692716c86397ee (diff)
downloadrails-8ce0fdb5c412a5083dff3ecb863e86c1853651d7.tar.gz
rails-8ce0fdb5c412a5083dff3ecb863e86c1853651d7.tar.bz2
rails-8ce0fdb5c412a5083dff3ecb863e86c1853651d7.zip
Fix failure introduced by #17351 due to the new mocks implementation
It was not expecting the new `case_insensitive` option to be passed to `generate_message`, instead of fixing the test we can just not pass this option down since it is specific to the confirmation validator and not necessary for the error message.
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/validations/confirmation.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/validations/confirmation.rb b/activemodel/lib/active_model/validations/confirmation.rb
index 120edda909..bb2f0bd064 100644
--- a/activemodel/lib/active_model/validations/confirmation.rb
+++ b/activemodel/lib/active_model/validations/confirmation.rb
@@ -11,7 +11,7 @@ module ActiveModel
if (confirmed = record.send("#{attribute}_confirmation"))
unless confimation_value_equal?(record, attribute, value, confirmed)
human_attribute_name = record.class.human_attribute_name(attribute)
- record.errors.add(:"#{attribute}_confirmation", :confirmation, options.merge(attribute: human_attribute_name))
+ record.errors.add(:"#{attribute}_confirmation", :confirmation, options.except(:case_sensitive).merge!(attribute: human_attribute_name))
end
end
end