Skip to content

How to limit depth without using hash_tree #268

Open
@Un3qual

Description

@Un3qual

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions