Acts as nested set

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.

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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs