Hi,
Le 24 janv. 07, à 16:43, Tarscher a écrit :> * I have tree structures in my table and currently use
> Node.find_all_by_parent_id(nil). but this returns all the trees with
> parent_id == nil. Since I have more than 1 tree structure I want
> something like Node.find_all_by_id(id) . Is this function available?
Maybe use :scope to differentiate your trees.
> * Is there a function available that deletes an entire branch?
In Nested Sets, yes. With acts_as_tree I''m afraid you''ll have
to
recurse.
Jean-Christophe Michel
--
symetrie.com
Better Nested Set for rails:
http://opensource.symetrie.com/trac/better_nested_set
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---