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.
ancestors()
public
Returns list of ancestors, starting from parent until root.
subchild1.ancestors
# File activerecord/lib/active_record/acts/tree.rb, line 68
def ancestors
node, nodes = self, []
nodes << node = node.parent while node.parent
nodes
end