1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #42066 from abhaynikam/minor-issues-in-comparsion-validator

Fixes a typo nor -> or in ComparisonValidator exception message
This commit is contained in:
Jean Boussier 2021-04-25 13:13:39 +02:00 committed by GitHub
commit ac3910791d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,7 @@ module ActiveModel
def check_validity!
unless (options.keys & COMPARE_CHECKS.keys).any?
raise ArgumentError, "Expected one of :greater_than, :greater_than_or_equal_to, "\
":equal_to, :less_than, :less_than_or_equal_to, nor :other_than supplied."
":equal_to, :less_than, :less_than_or_equal_to, or :other_than option to be supplied."
end
end

View file

@ -301,7 +301,7 @@ class ComparisonValidationTest < ActiveModel::TestCase
Topic.validates_comparison_of(:approved)
end
assert_equal "Expected one of :greater_than, :greater_than_or_equal_to, :equal_to," \
" :less_than, :less_than_or_equal_to, nor :other_than supplied.", error.message
" :less_than, :less_than_or_equal_to, or :other_than option to be supplied.", error.message
end
private