Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 3 Tree Data Structure

I have bees searching for a good solution for Tree Data Structure in Rails 3. I'm trying to build a Tree menu. What do you use and what would you recommend?

like image 830
andkjaer Avatar asked Oct 21 '10 10:10

andkjaer


2 Answers

Ancestry is an excellent ActiveRecord gem that allows you to define tree structures.

like image 166
Simone Carletti Avatar answered Sep 22 '22 00:09

Simone Carletti


this looks like the chosen gem for the task.

for use examples, go to railscasts episode about ancestry

like image 20
Nuriel Avatar answered Sep 18 '22 00:09

Nuriel