Forum: Ruby on Rails eager loading all associations

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3bec49196b296ac7c201412642c7a2b1?d=identicon&s=25 =?ISO-8859-1?Q?Rodrigo_Alvarez_Fern=E1ndez?= (Guest)
on 2005-12-14 13:53
(Received via mailing list)
Hi Railers,

Is there a way to specify all relations in a :include option while
find()ing?
I have a model with a lot of associations, and sometimes i would like to
query for all them.
Something like Model.find(params[:id], :include => :all) would be nice.
Alternatively, i don't know if there is a mehod to retrieve all model's
associations, to do something like Model.find(params[:id], :include =>
Model.associations)

Thanks.
This topic is locked and can not be replied to.