Method: Mongoid::Association::Depending.validate!
- Defined in:
- lib/mongoid/association/depending.rb
.validate!(association) ⇒ Object
Validates that an association’s dependent strategy is within the allowed enumeration.
79 80 81 82 83 84 85 |
# File 'lib/mongoid/association/depending.rb', line 79 def self.validate!(association) unless STRATEGIES.include?(association.dependent) raise Errors::InvalidDependentStrategy.new(association, association.dependent, STRATEGIES) end end |