Class: ActiveRecord::MySQL::Strict::Validation::IntegerValidation
- Inherits:
-
ActiveRecord::MySQL::Strict::Validation
- Object
- Struct
- ActiveRecord::MySQL::Strict::Validation
- ActiveRecord::MySQL::Strict::Validation::IntegerValidation
- Defined in:
- lib/active_record/mysql/strict/validation/integer_validation.rb
Constant Summary collapse
- UPPER_LIMIT =
2147483647- LOWER_LIMIT =
-2147483647
Instance Attribute Summary
Attributes inherited from ActiveRecord::MySQL::Strict::Validation
Instance Method Summary collapse
Methods inherited from ActiveRecord::MySQL::Strict::Validation
Instance Method Details
#apply ⇒ Object
9 10 11 |
# File 'lib/active_record/mysql/strict/validation/integer_validation.rb', line 9 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 |