Active record: how to recursively load children of children of children in one query?

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • Scout APM - Less time debugging, more time building
  • SonarQube - Static code analysis for 29 languages.
  • SaaSHub - Software Alternatives and Reviews
  • Awesome Nested Set

    An awesome replacement for acts_as_nested_set and better_nested_set.

    Another option is to use something like AwesomeNestedSet which does basically the same thing as the previous suggestion but with a whole lot more flexibility (and likely more reliably performant).

  • Ancestry

    Organise ActiveRecord model into a tree structure

    Another gem that stores trees and can get a whole sub tree with one query is ancestry:

  • Scout APM

    Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.

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.

Suggest a related project

Related posts