From 8ce0fdb5c412a5083dff3ecb863e86c1853651d7 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Tue, 1 Sep 2015 08:46:56 -0300 Subject: 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. --- activemodel/lib/active_model/validations/confirmation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activemodel') 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 -- cgit v1.2.3