搬运工:http://blog.arkency.com/2013/12/rails4-preloading/
There are 3 ways to do eager loading in Rails:
#includes delegates the job to #preload or #eager_load depending on the presence or absence of condition related to one of the preloaded table.
#preload is using separate DB queries to get the data.
#eager_load is using one big query with LEFT JOIN for each eager loaded table.
In Rails 4 you should use #references combined with #includes if you have the additional condition for one of the eager loaded table.