Module: DataMapper::Validate::ValidatesIsPrimitive
- Included in:
- ClassMethods
- Defined in:
- lib/gems/dm-validations-0.9.9/lib/dm-validations/primitive_validator.rb
Overview
class PrimitiveValidator
Instance Method Summary collapse
-
#validates_is_primitive(*fields) ⇒ Object
Validates that the specified attribute is of the correct primitive type.
Instance Method Details
#validates_is_primitive(*fields) ⇒ Object
Validates that the specified attribute is of the correct primitive type.
53 54 55 56 |
# File 'lib/gems/dm-validations-0.9.9/lib/dm-validations/primitive_validator.rb', line 53 def validates_is_primitive(*fields) opts = opts_from_validator_args(fields) add_validator_to_context(opts, fields, DataMapper::Validate::PrimitiveValidator) end |