Closed
Description
I believe this can be a very particular feature, but do you have any thoughts on making tag.descendants
return its results with a preorder sequence? What would you recommend?
grandparent = Tag.find_or_create_by_path(["grandparent", "parentA", "childA"]).parent.parent
Tag.find_or_create_by_path(["grandparent", "parentB", "childB"])
grandparent.descendants
=> ["parentA", "parentB", "childA", "childB"] # current traversal sequence
=> ["parentA", "childA", "parentB", "childB"] # preorder traversal sequence