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 /r/rails

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • 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: https://github.com/stefankroes/ancestry

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
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