method

add_child

rails latest stable - Class: ActiveRecord::Acts::NestedSet::InstanceMethods

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1.2.6) is shown here.

add_child( child )
public

Adds a child to this object in the tree. If this object hasn’t been initialized, it gets set up as a root node. Otherwise, this method will update all of the other elements in the tree and shift them to the right, keeping everything balanced.