Organise ActiveRecord model into a tree structure
Ancestry gem is what I always use for hiarichle data structures: https://github.com/stefankroes/ancestry If I understand what your looking for, it does pretty much exactly what you want.
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.
SQL help me please with multi nested childs
1 project | reddit.com/r/rails | 1 Jun 2022
Active record: how to recursively load children of children of children in one query?
2 projects | reddit.com/r/rails | 1 Apr 2022
Hierarchical Structures in PostgreSQL
2 projects | news.ycombinator.com | 25 Jun 2021
How to query Ancestry fast
1 project | dev.to | 29 Apr 2021
Saving ancestry children on update
1 project | reddit.com/r/rails | 3 Mar 2021