Module: DataMapper::Validate::ValidatesIsUnique
- Included in:
- ClassMethods
- Defined in:
- lib/gems/dm-validations-0.9.9/lib/dm-validations/uniqueness_validator.rb
Overview
class UniquenessValidator
Instance Method Summary collapse
-
#validates_is_unique(*fields) ⇒ Object
Validate the uniqueness of a field.
Instance Method Details
#validates_is_unique(*fields) ⇒ Object
Validate the uniqueness of a field
57 58 59 60 |
# File 'lib/gems/dm-validations-0.9.9/lib/dm-validations/uniqueness_validator.rb', line 57 def validates_is_unique(*fields) opts = opts_from_validator_args(fields) add_validator_to_context(opts, fields, DataMapper::Validate::UniquenessValidator) end |