Module: DataMapper::Validate::ValidatesIsAccepted
- Included in:
- ClassMethods
- Defined in:
- lib/gems/dm-validations-0.9.9/lib/dm-validations/acceptance_validator.rb
Overview
class AcceptanceValidator
Instance Method Summary collapse
-
#validates_is_accepted(*fields) ⇒ Object
Validates that the attributes’s value is in the set of accepted values.
Instance Method Details
#validates_is_accepted(*fields) ⇒ Object
Validates that the attributes’s value is in the set of accepted values.
69 70 71 72 |
# File 'lib/gems/dm-validations-0.9.9/lib/dm-validations/acceptance_validator.rb', line 69 def validates_is_accepted(*fields) opts = opts_from_validator_args(fields) add_validator_to_context(opts, fields, DataMapper::Validate::AcceptanceValidator) end |