Module: Mongoid::Relations::Cascading
- Extended by:
- ActiveSupport::Concern
- Included in:
- Mongoid::Relations
- Defined in:
- lib/mongoid/relations/cascading.rb,
lib/mongoid/relations/cascading/delete.rb,
lib/mongoid/relations/cascading/destroy.rb,
lib/mongoid/relations/cascading/nullify.rb,
lib/mongoid/relations/cascading/strategy.rb
Overview
:nodoc:
Defined Under Namespace
Modules: ClassMethods Classes: Delete, Destroy, Nullify, Strategy
Instance Method Summary collapse
-
#cascade! ⇒ Object
Perform all cascading deletes, destroys, or nullifies.
Instance Method Details
#cascade! ⇒ Object
Perform all cascading deletes, destroys, or nullifies. Will delegate to the appropriate strategy to perform the operation.
27 28 29 30 31 32 33 34 35 |
# File 'lib/mongoid/relations/cascading.rb', line 27 def cascade! cascades.each do |name| if ! || !.versioned? = relations[name] strategy = .cascade_strategy strategy.new(self, ).cascade end end end |