closure_tree icon indicating copy to clipboard operation
closure_tree copied to clipboard

How to limit depth without using hash_tree

Open Un3qual opened this issue 7 years ago • 0 comments

I'm using

Comment.where(commentable: find_commentable).includes(:children).includes(:commenter).limit(3)

To fetch comments, but the .limit(3) only limits the number of top level comments. How can I limit the depth, and how many children are fetched for each parent?

Un3qual avatar Apr 27 '17 02:04 Un3qual