Posted By

bordalix on 07/13/07


performance eager loading association

Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


Eager loading

 / Published in: Rails

Improve you web application by eager loading the entire model in one single SQL query. From railscast #22

  1. @tasks = Task.find(:all, :include => [:project, {:comments => :user}])

Report this snippet  

You need to login to post a comment.