Category

Active Record Nesting

Model database records as nested data structures

2.32
There's a lot of open issues
A long-lived project that still receives updates
Ancestry allows the records of a ActiveRecord model to be organized in a tree structure, using a single, intuitively formatted database column. It exposes all the standard tree structure relations (ancestors, parent, root, children, siblings, descendants) and all of them can be fetched in a single sql query. Additional features are named_scopes, integrity checking, integrity restoration, arrangement of (sub)tree into hashes and different strategies for dealing with orphaned records.
0.09
No commit activity in last 3 years
NOTICE: official repository moved to https://github.com/bbommarito/acts_as_nested_set
0.09
No commit activity in last 3 years
There's a lot of open issues
better_nested_set Rails plugin (my fork from official SVN)
0.02
No release in over 3 years
Low commit activity in last 3 years
Arboreal is yet another extension to ActiveRecord to support tree-shaped data structures. Internally, Arboreal maintains a computed "ancestry_string" column, which caches the path from the root of a tree to each node, allowing efficient retrieval of both ancestors and descendants. Arboreal surfaces relationships within the tree like "children", "ancestors", "descendants", and "siblings" as scopes, so that additional filtering/pagination can be performed.