method

ancestors

rails latest stable - Class: ActiveRecord::Acts::Tree::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.

ancestors()
public

Returns list of ancestors, starting from parent until root.

  subchild1.ancestors # => [child1, root]