yes but he is new to rails and there is a railscast for acts_as_tree, thats why i was suggesting it.
On Wed, Sep 15, 2010 at 2:03 PM, Marnen Laibow-Koser <[email protected]>wrote: > radhames brito wrote: > > try to fix the thing i suggested in red and add a parent_id field to > > the > > comments table, > > then make a self referencial associaction or use the acts_as_tree gem, > [...] > > Or rather, don't. acts_as_tree uses an adjacency list model, which is > simple, but ridiculously inefficient to query. What you generally want > instead is awesome_nested_set, which makes it possible to retrieve all > comment threads, to arbitrary depth, with one single query. > > acts_as_tree is almost never the right choice. > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > [email protected] > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<rubyonrails-talk%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

