Module: ActiveModel::Validations::ClassMethods
- Defined in:
- lib/active_mongo_uniquenesss.rb
Instance Method Summary collapse
Instance Method Details
#validates_uniqueness_of(*attr_names) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/active_mongo_uniquenesss.rb', line 25 def validates_uniqueness_of(*attr_names) = _merge_attributes(attr_names) [:message] ||= "is taken" [:scope] ||= [] validates_with UniquenessValidator, end |