Forum: Ruby on Rails acts as nested set

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Bob S. (Guest)
on 2006-02-05 07:22
(Received via mailing list)
Hi Railers,

Is the nested set model restricted to only one root?

I'm working on a screencast building a threaded forum and nested set
close but is lacking a few items for this project.

First, all the documentation I can find restricts a nested_set to one
node, and a threaded forum would have many roots. Also, without a ton of
fancy sql or an ungodly amount of db calls, it doesn't track the depth.

Is my understanding of nested sets correct?

I created an acts_as_threaded to get around these "limitations" which
performs well for this scenario, just curious if nested_set could also
been used if I had a better understanding of it.


Bob S.
Fabien (Guest)
on 2006-02-05 12:00
(Received via mailing list)
Hi Bob,

I'm currently working with acts_as_nested_set too; I've applied all
patches on, which makes it far more usable. Although
it's still limited to one root, if you setup a level column, it is able
to track
depth easily.

I'm interested in your approach. Could you post your code somewhere?


This topic is locked and can not be replied to.