What you may be looking for is:
ARObject.find_by_id(1, :Include => [:associated_model1,
:associated_model2])
Caleb wrote:> I''m looking for a way to do something like:
>
> ARObject.find_by_id(1, :include => :all)
> --------- OR -----------
> ARObject.find_by_id(1, :include => [:all])
>
> ...to load the object as well as ''eager load'' all of its
associations.
> Is this possible?
>
> --
> 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---