You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def self.subtree(tags)
tags.reduce ({}) do |memo, tag|
memo[tag] = tag.descendants.arrange
memo
end
end
But it's certainly not a single query (my use case is to select two root nodes of the tree and return them to the user. I may just switch to using two individual calls. Not sure.
Hi all,
Is it possible to fetch all subtree of given nodes in one query ?
Basically, I want to add proper pagination. So I will first query root nodes, limit them and then find subtrees for them.
Is there any batter way to do this rather than this answer ?
The text was updated successfully, but these errors were encountered: