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:
commit
ac3910791d
2 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ module ActiveModel
|
||||||
def check_validity!
|
def check_validity!
|
||||||
unless (options.keys & COMPARE_CHECKS.keys).any?
|
unless (options.keys & COMPARE_CHECKS.keys).any?
|
||||||
raise ArgumentError, "Expected one of :greater_than, :greater_than_or_equal_to, "\
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -301,7 +301,7 @@ class ComparisonValidationTest < ActiveModel::TestCase
|
||||||
Topic.validates_comparison_of(:approved)
|
Topic.validates_comparison_of(:approved)
|
||||||
end
|
end
|
||||||
assert_equal "Expected one of :greater_than, :greater_than_or_equal_to, :equal_to," \
|
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
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in a new issue