Hi Ben,<br><br>If your task table has a user_id in it can you could roll your own getter in the User class like...<br><br><span style="font-family: courier new,monospace;">has_many :root_tasks, :class => 'Task',:conditions => 'parent_id IS NULL' </span> <br>
<br><div class="gmail_quote">On Sun, Jun 8, 2008 at 3:38 AM, Ben <<a href="mailto:ben@fearofpudding.com">ben@fearofpudding.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi All,<br>
<br>
I have just found this nested set plugin today and so far it is fitting my needs very well.<br>
I have one question. My application has a need for a nested set "per user" on the system. I would like to split these trees using a scope.<br>
<br>
so i have in my Task model - acts_as_nested_set :scope=>:user<br>
<br>
This all seems to work correctly. My question is, how can i get the roots for this user? To get the roots for the whole table I am using Task.roots()<br>
<br>
Is there a way i can get the roots for a given user?<br>
<br>
Thanks,<br><font color="#888888">
~Ben<br>
_______________________________________________<br>
Betternestedset-talk mailing list<br>
<a href="mailto:Betternestedset-talk@rubyforge.org" target="_blank">Betternestedset-talk@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/betternestedset-talk" target="_blank">http://rubyforge.org/mailman/listinfo/betternestedset-talk</a><br>
</font></blockquote></div><br>