aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations/confirmation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model/validations/confirmation.rb')
-rw-r--r--activemodel/lib/active_model/validations/confirmation.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/validations/confirmation.rb b/activemodel/lib/active_model/validations/confirmation.rb
index bb2f0bd064..8f8ade90bb 100644
--- a/activemodel/lib/active_model/validations/confirmation.rb
+++ b/activemodel/lib/active_model/validations/confirmation.rb
@@ -9,7 +9,7 @@ module ActiveModel
def validate_each(record, attribute, value)
if (confirmed = record.send("#{attribute}_confirmation"))
- unless confimation_value_equal?(record, attribute, value, confirmed)
+ unless confirmation_value_equal?(record, attribute, value, confirmed)
human_attribute_name = record.class.human_attribute_name(attribute)
record.errors.add(:"#{attribute}_confirmation", :confirmation, options.except(:case_sensitive).merge!(attribute: human_attribute_name))
end
@@ -27,7 +27,7 @@ module ActiveModel
end.compact)
end
- def confimation_value_equal?(record, attribute, value, confirmed)
+ def confirmation_value_equal?(record, attribute, value, confirmed)
if !options[:case_sensitive] && value.is_a?(String)
value.casecmp(confirmed) == 0
else