Module: ActiveData::Model::Associations::Validations

Defined in:
lib/active_data/model/associations/validations.rb

Instance Method Summary collapse

Instance Method Details

#invalid_ancestry?Boolean

Returns:



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

Returns:



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