Method: Mongoid::Traversable#parentize
- Defined in:
- lib/mongoid/traversable.rb
#parentize(document) ⇒ Document
Sets up a child/parent association. This is used for newly created objects so they can be properly added to the graph.
345 346 347 |
# File 'lib/mongoid/traversable.rb', line 345 def parentize(document) self._parent = document end |