On Feb 25, 4:46 am, shenry <[email protected]> wrote:
> Currently I'm doing:
>
> Photo.find(:all, :include => :parent, :conditions ['thumbnail = ?',
> 'small'])
>
> but I can't figure out how to eager-load the albums, through slides,
> based on the parent photo (since the thumbnail doesn't have any
> associated slides or albums.)
>
You can nest includes, eg Photo.find :all, :include => {:parent =>
[:some_association_on_parent, :another_association_on_parent]}
Fred
> Thanks for any help,
>
> Stu
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---