4 ms·
There's a great Ruby on Rails gem called acts_as_sane_tree (after the non-recursive acts_as_tree) that uses postgresql's recursive queries. I'm using it on a p
by techtalsky 12y ago
There's a great Ruby on Rails gem called acts_as_sane_tree (after the non-recursive acts_as_tree) that uses postgresql's recursive queries. I'm using it on a project and have found it useful with good performance:
https://github.com/chrisroberts/acts_as_sane_tree https://github.com/chrisroberts/acts_as_sane_tree
- btown 12y agoLooks like the main fork hasn't been updated since 2012. Is there an updated version you recommend for Rails 4 compatibility?
- techtalsky 12y agoHm, I didn't realize that. I'm using it on a Rails 4 project and haven't had any problems.
- elliotec 12y agoI've used gem awesome_nested_set with lots of success in the past. https://github.com/collectiveidea/awesome_nested_set https://github.com/collectiveidea/awesome_nested_set. Updated quite often, Rails 4 supported
- techtalsky 12y agoYeah, the Nested Set model is cool but it does not use recursive postgresql queries under the hood: http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/ http://mikehillyer.com/articles/managing-hierarchical-data-i...