Module: DataMapper::Validations::ValidatesUniqueness

Extended by:
Deprecate
Included in:
ClassMethods
Defined in:
lib/dm-validations/validators/uniqueness_validator.rb

Overview

class UniquenessValidator

Instance Method Summary collapse

Instance Method Details

#validates_uniqueness_of(*fields) ⇒ Object

Validate the uniqueness of a field



60
61
62
# File 'lib/dm-validations/validators/uniqueness_validator.rb', line 60

def validates_uniqueness_of(*fields)
  validators.add(UniquenessValidator, *fields)
end