Class: Dedupe::Validations::RecordUniquenessValidator
- Inherits:
-
ActiveModel::Validator
- Object
- ActiveModel::Validator
- Dedupe::Validations::RecordUniquenessValidator
- Defined in:
- lib/dedupe/validations.rb
Instance Method Summary collapse
Instance Method Details
#validate(record) ⇒ Object
10 11 12 13 14 |
# File 'lib/dedupe/validations.rb', line 10 def validate(record) if record.duplicate? record.errors.add :base, "Duplicates existing record" end end |