Sha256: af9cff018aa5bfc811928935c574669d1a215c7db63058dba1bcd60c84155703

Contents?: true

Size: 470 Bytes

Versions: 37

Compression:

Stored size: 470 Bytes

Contents

# frozen_string_literal: true

module ActiveModel
  module Validations
    module Comparability # :nodoc:
      COMPARE_CHECKS = { greater_than: :>, greater_than_or_equal_to: :>=,
        equal_to: :==, less_than: :<, less_than_or_equal_to: :<=,
        other_than: :!= }.freeze

      def error_options(value, option_value)
        options.except(*COMPARE_CHECKS.keys).merge!(
          count: option_value,
          value: value
        )
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 5 rubygems

Version Path
activemodel-8.0.0 lib/active_model/validations/comparability.rb
activemodel-7.2.2 lib/active_model/validations/comparability.rb
activemodel-7.1.5 lib/active_model/validations/comparability.rb
activemodel-8.0.0.rc2 lib/active_model/validations/comparability.rb
activemodel-7.2.1.2 lib/active_model/validations/comparability.rb
activemodel-7.1.4.2 lib/active_model/validations/comparability.rb
activemodel-8.0.0.rc1 lib/active_model/validations/comparability.rb
activemodel-7.2.1.1 lib/active_model/validations/comparability.rb
activemodel-7.1.4.1 lib/active_model/validations/comparability.rb
activemodel-8.0.0.beta1 lib/active_model/validations/comparability.rb
omg-activemodel-8.0.0.alpha9 lib/active_model/validations/comparability.rb
omg-activemodel-8.0.0.alpha8 lib/active_model/validations/comparability.rb
omg-activemodel-8.0.0.alpha7 lib/active_model/validations/comparability.rb
omg-activemodel-8.0.0.alpha4 lib/active_model/validations/comparability.rb
omg-activemodel-8.0.0.alpha3 lib/active_model/validations/comparability.rb
omg-activemodel-8.0.0.alpha2 lib/active_model/validations/comparability.rb
omg-activemodel-8.0.0.alpha1 lib/active_model/validations/comparability.rb
activemodel-7.1.4 lib/active_model/validations/comparability.rb
activemodel-7.2.1 lib/active_model/validations/comparability.rb
activemodel-7.2.0 lib/active_model/validations/comparability.rb