How do I get Rails to eager load counts?
问题 This is related to a question a year and change ago. I put up an example of the question that should work out of the box, provided you have sqlite3 available: https://github.com/cairo140/rails-eager-loading-counts-demo Installation instructions (for the main branch) git clone git://github.com/cairo140/rails-eager-loading-counts-demo.git cd rails-eager-loading-counts-demo rails s I have a fuller write-up in the repository, but my general question is this. How can I make Rails eager load counts