Class: ActiveModel::Validations::StoreModelValidator
- Inherits:
-
ActiveModel::Validator
- Object
- ActiveModel::Validator
- ActiveModel::Validations::StoreModelValidator
- Defined in:
- lib/active_model/validations/store_model_validator.rb
Instance Method Summary collapse
Instance Method Details
#validate(record) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/active_model/validations/store_model_validator.rb', line 9 def validate(record) [:attributes].each do |attribute| attribute_value = record.send(attribute) combine_errors(record, attribute) if attribute_value&.invalid? end end |