So I know you can eager include associated rows with the :include, but
is there a way to include just the associated count?
User.find(:all, :select => 'id, first_name, last_name,
created_at', :limit => 30)
I want to include user.store.count in the above query.
Right now, this gives me an n+1 queries because i get the count for
<% for user in @users %>
<td><%= user.first_name + " " + user.last_name %></td>
<%= user.stores.count %></td>