Module: Mongoid::Relations::Cascading::ClassMethods
- Defined in:
- lib/mongoid/relations/cascading.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#cascade(metadata) ⇒ Class
Attempt to add the cascading information for the document to know how to handle associated documents on a removal.
Instance Method Details
#cascade(metadata) ⇒ Class
Attempt to add the cascading information for the document to know how to handle associated documents on a removal.
50 51 52 |
# File 'lib/mongoid/relations/cascading.rb', line 50 def cascade() tap { self.cascades += [ .name.to_s ] if .dependent? } end |