ancestors()
public
Returns list of ancestors, starting from parent until root.
subchild1.ancestors
# File activerecord/lib/active_record/acts/tree.rb, line 69
def ancestors
node, nodes = self, []
nodes << node = node.parent until not node.has_parent?
nodes
end