Nested Records

ancestry

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.

ancestry 3,055,027 Downloads Last release

stefankroes/ancestry Last commit

closure_tree

Easily and efficiently make your ActiveRecord model support hierarchies

closure_tree 675,087 Downloads Last release

mceachen/closure_tree Last commit

acts_as_tree

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

acts_as_tree 1,966,965 Downloads Last release

tree/master

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

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

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

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.