Ruby on Rails Tools

Nested Records

Learn More

Ancestry allows the records of a ActiveRecord model to be organized in a tree structure, using the materialized path pattern. It exposes the standard relations (ancestors, parent, root, children, siblings, descendants) and allows them to be fetched in a single query. Additional features include named scopes, integrity checking, integrity restoration, arrangement of (sub)tree into hashes and different strategies for dealing with orphaned records.

31,100,339 Downloads

Learn More

Easily and efficiently make your ActiveRecord model support hierarchies

6,454,543 Downloads

Learn More

A gem that adds simple support for organizing ActiveRecord models into parent–children relationships.

9,237,879 Downloads

Want to stay up-to-date with Ruby on Rails?

Join 91,592+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.