Method: NoBrainer::Document::Validation::Uniqueness::UniquenessValidator#exclude_doc

Defined in:
lib/no_brainer/document/validation/uniqueness.rb

#exclude_doc(criteria, doc) ⇒ Object



89
90
91
# File 'lib/no_brainer/document/validation/uniqueness.rb', line 89

def exclude_doc(criteria, doc)
  criteria.where(doc.class.pk_name.not => doc.pk_value)
end