Module SymetrieCom::Acts::NestedSet::InstanceMethods
In: lib/better_nested_set.rb

Methods

Public Instance methods

order by left column

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.

Deprecated, will be removed in next versions

Returns a set of all of its children and nested children Pass :exclude => item, or id, or [items or id] to exclude some parts of the tree

Returns an array of all parents Maybe ‘full_outline’ would be a better name, but we prefer to mimic the Tree class

on creation, set automatically lft and rgt to the end of the tree

Prunes a branch off of the tree, shifting all of the elements on the right back to the left so the counts still work.

Returns true is this is a child node

Returns a set of only this entry’s immediate children

Returns the number of nested children of this object.

Returns a set of itself and all of its nested children Pass :exclude => item, or id, or [items or id] to exclude some parts of the tree

Returns the level of this object in the tree root level is 0

Move the node to the child of another node (you can pass id only)

Move the node to the left of another node (you can pass id only)

Move the node to the left of another node (you can pass id only)

Returns the parent

Returns root

Returns true if this is a root node.

Returns roots when multiple roots (or virtual root, which is the same)

Returns the array of all parents and self

Returns the array of all children of the parent, included self

Returns the array of all children of the parent, except self

Returns true if we have no idea what this is

Deprecated, will be removed in next versions

Protected Instance methods

[Validate]