Method: Mongoid::Hierarchy::InstanceMethods#parentize
- Defined in:
- lib/mongoid/hierarchy.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.
70 71 72 |
# File 'lib/mongoid/hierarchy.rb', line 70 def parentize(document) self._parent = document end |