Sha256: d77f347a150fd84990738131c35baa7d10992c57cc2172ae46d5b503d30adb52
Contents?: true
Size: 387 Bytes
Versions: 1
Compression:
Stored size: 387 Bytes
Contents
module ActiveRecord module StrictValidations class Validation class IntegerValidation < Validation UPPER_LIMIT = 2147483647 LOWER_LIMIT = -2147483647 def apply model.validates field.name, numericality: { greather_than_or_equal_to: LOWER_LIMIT, less_than_or_equal_to: UPPER_LIMIT }, allow_blank: true end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
activerecord_strict_validations-0.3.1 | lib/active_record/strict_validations/validation/integer_validation.rb |