Method: NoBrainer::Document::Validation::Uniqueness::UniquenessValidator#apply_scopes
- Defined in:
- lib/no_brainer/document/validation/uniqueness.rb
#apply_scopes(criteria, doc) ⇒ Object
85 86 87 |
# File 'lib/no_brainer/document/validation/uniqueness.rb', line 85 def apply_scopes(criteria, doc) criteria.where(scope.map { |k| {k => doc._read_attribute(k)} }) end |