Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to limit depth without using hash_tree #268

Open
Un3qual opened this issue Apr 27, 2017 · 0 comments
Open

How to limit depth without using hash_tree #268

Un3qual opened this issue Apr 27, 2017 · 0 comments
Labels

Comments

@Un3qual
Copy link

Un3qual commented Apr 27, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants