Grayson Piercee wrote:
[...]
> I'm using acts_as_tree which meets the root levels have no parent_id
> (null in SQL)
> so if no category_id is passed as a parameter I want it to pull up the
> roots, if one is passed, I want it to pull the children of that node.

You should probably be using something like awesome_nested_set instead 
-- it allows for much more efficient DB operations.

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]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to