Forum: Ruby on Rails Two branch nested includes

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
C728d93eb5205cf20cac0c2928b0ad62?d=identicon&s=25 RJ (Guest)
on 2007-03-23 12:39
Hi all.

I have a project which has two "trees" branching out from it in terms of
children. Currently I am nested including one branch:

@projects = Project.find(:all, :include => [:component => {:category =>
:testcase} ] )

but I am unsure how to include the second branch. Essentially I want to
include the merge the following with the above:

@projects = Project.find(:all, :include => [:testsuite => {:build =>
:results} ] )

Also, what would be the syntax to include another level deep? Would it
just be nesting another {} in there?

@projects = Project.find(:all, :include => [:testsuite => {:build =>
{:results => :testcasetemplate} } ] )

Many thanks,

This topic is locked and can not be replied to.