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.
Required Ruby Version
>= 1.8.7
Authors
Stefan Kroes, Keenan Brock
Versions
- 5.1.0 March 08, 2026 (28 KB)
- 5.0.0 February 09, 2026 (26.5 KB)
- 4.3.3 April 10, 2023 (24.5 KB)
- 4.3.2 March 26, 2023 (24.5 KB)
- 4.3.1 March 20, 2023 (24.5 KB)
- 3.0.5 November 06, 2018 (18 KB)