Module: ActiveModel::Validations::Comparability
- Included in:
- ComparisonValidator, NumericalityValidator
- Defined in:
- lib/active_model/validations/comparability.rb
Overview
:nodoc:
Constant Summary collapse
- COMPARE_CHECKS =
{ greater_than: :>, greater_than_or_equal_to: :>=, equal_to: :==, less_than: :<, less_than_or_equal_to: :<=, other_than: :!= }.freeze
Instance Method Summary collapse
Instance Method Details
#error_options(value, option_value) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/active_model/validations/comparability.rb', line 10 def (value, option_value) .except(*COMPARE_CHECKS.keys).merge!( count: option_value, value: value ) end |