aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2015-09-22 23:34:23 +0900
committerAkira Matsuda <ronnie@dio.jp>2015-09-22 23:36:40 +0900
commitd30f934af03d2bab0ddfa8b850ad910891829db3 (patch)
tree0f6b588df404b4448b54b31f4c39ab00daa5abff /activemodel
parent6073dcd3f228415561b1ba94a33195c7200974dc (diff)
downloadrails-d30f934af03d2bab0ddfa8b850ad910891829db3.tar.gz
rails-d30f934af03d2bab0ddfa8b850ad910891829db3.tar.bz2
rails-d30f934af03d2bab0ddfa8b850ad910891829db3.zip
AMo typos
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/validations/confirmation.rb4
-rw-r--r--activemodel/test/cases/attribute_assignment_test.rb2
2 files changed, 3 insertions, 3 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
diff --git a/activemodel/test/cases/attribute_assignment_test.rb b/activemodel/test/cases/attribute_assignment_test.rb
index 64a85e01eb..3336691841 100644
--- a/activemodel/test/cases/attribute_assignment_test.rb
+++ b/activemodel/test/cases/attribute_assignment_test.rb
@@ -70,7 +70,7 @@ class AttributeAssignmentTest < ActiveModel::TestCase
end
end
- test "an ArgumentError is raised if a non-hash-like obejct is passed" do
+ test "an ArgumentError is raised if a non-hash-like object is passed" do
assert_raises(ArgumentError) do
Model.new(1)
end