Forum: Ruby on Rails acts as nested set

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Af93ba6b6b59f22a8f37e8de5702ef98?d=identicon&s=25 Bob Silva (Guest)
on 2006-02-05 06: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
comes
close but is lacking a few items for this project.

First, all the documentation I can find restricts a nested_set to one
root
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
have
been used if I had a better understanding of it.

Thanks


Bob Silva
http://www.railtie.net/
E2ea3825e6e037e45b490d0c41e0d7b9?d=identicon&s=25 Fabien (Guest)
on 2006-02-05 11:00
(Received via mailing list)
Hi Bob,

I'm currently working with acts_as_nested_set too; I've applied all
known
patches on dev.rubyonrails.com, 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?

Regards,

Fabien
This topic is locked and can not be replied to.