[Rails] eager loading all associations

Rodrigo Alvarez Fernández papipo at gmail.com
Wed Dec 14 12:52:35 GMT 2005


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20051214/33d4f529/attachment.html


More information about the Rails mailing list