Class: ActiveModel::Validations::ExistenceValidator
- Inherits:
-
PresenceValidator
- Object
- PresenceValidator
- ActiveModel::Validations::ExistenceValidator
- Defined in:
- lib/can_has_validations/validators/existence_validator.rb
Instance Method Summary collapse
Instance Method Details
#validate(record) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/can_has_validations/validators/existence_validator.rb', line 7 def validate(record) attributes.each do |attribute| value = record.read_attribute_for_validation(attribute) validate_each(record, attribute, value) end end |