Module: ActiveData::Model::Associations::Validations
- Defined in:
- lib/active_data/model/associations/validations.rb
Instance Method Summary collapse
- #invalid_ancestry? ⇒ Boolean
- #valid_ancestry? ⇒ Boolean (also: #validate_ancestry)
- #validate_ancestry! ⇒ Object
Instance Method Details
#invalid_ancestry? ⇒ Boolean
12 13 14 |
# File 'lib/active_data/model/associations/validations.rb', line 12 def invalid_ancestry? !valid_ancestry? end |
#valid_ancestry? ⇒ Boolean Also known as: validate_ancestry
5 6 7 8 9 |
# File 'lib/active_data/model/associations/validations.rb', line 5 def valid_ancestry? errors.clear validate_nested! run_validations! end |
#validate_ancestry! ⇒ Object
16 17 18 |
# File 'lib/active_data/model/associations/validations.rb', line 16 def validate_ancestry! valid_ancestry? || raise_validation_error end |