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