Skip to content

Commit cbdbeb3

Browse files
authored
Add with_descendant to readme (#381)
1 parent 26a0753 commit cbdbeb3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,8 @@ When you include ```has_closure_tree``` in your model, you can provide a hash to
337337
* ```Tag.find_by_path(path, attributes)``` returns the node whose name path is ```path```. See (#find_or_create_by_path).
338338
* ```Tag.find_or_create_by_path(path, attributes)``` returns the node whose name path is ```path```, and will create the node if it doesn't exist already.See (#find_or_create_by_path).
339339
* ```Tag.find_all_by_generation(generation_level)``` returns the descendant nodes who are ```generation_level``` away from a root. ```Tag.find_all_by_generation(0)``` is equivalent to ```Tag.roots```.
340-
* ```Tag.with_ancestor(ancestors)``` scopes to all descendants whose ancestor is in the given list.
340+
* ```Tag.with_ancestor(ancestors)``` scopes to all descendants whose ancestors(s) is/are in the given list.
341+
* ```Tag.with_descendant(ancestors)``` scopes to all ancestors whose descendant(s) is/are in the given list.
341342
* ```Tag.lowest_common_ancestor(descendants)``` finds the lowest common ancestor of the descendants.
342343
### Instance methods
343344

0 commit comments

Comments
 (0)