Method: NoBrainer::Document::Validation::Uniqueness::UniquenessValidator#should_validate_field?

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

#should_validate_field?(doc, field) ⇒ Boolean

Returns:



69
70
71
# File 'lib/no_brainer/document/validation/uniqueness.rb', line 69

def should_validate_field?(doc, field)
  doc.new_record? || (scope + [field]).any? { |f| doc.__send__("#{f}_changed?") }
end