Skip to content

Commit 0f3b0f6

Browse files
authored
docs: Document alias level depth in README (#461)
1 parent 99e295a commit 0f3b0f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ When you include ```has_closure_tree``` in your model, you can provide a hash to
343343
* ```tag.child?``` returns true if this is a child node. It has a parent.
344344
* ```tag.leaf?``` returns true if this is a leaf node. It has no children.
345345
* ```tag.leaves``` is scoped to all leaf nodes in self_and_descendants.
346-
* ```tag.depth``` returns the depth, or "generation", for this node in the tree. A root node will have a value of 0.
346+
* ```tag.depth``` returns the depth, or "generation", for this node in the tree. A root node will have a value of 0. Also aliased as `level`.
347347
* ```tag.parent``` returns the node's immediate parent. Root nodes will return nil.
348348
* ```tag.parent_of?(node)``` returns true if current node is parent of another one
349349
* ```tag.children``` is a ```has_many``` of immediate children (just those nodes whose parent is the current node).

0 commit comments

Comments
 (0)