All the examples of :include for eager loading are for class-level querying. I tried it on my model instance and it still issued a bunch of queries - does it work on instance methods?
#in controller
@emails = person.sent_emails(:include => [:recipient])
#in view
render @emails
# _email.html.erb partial
<h1><%= email.recipient.name %></h1>
<p>
<%= email.content %>
</p>
#still issues a select * for emails, N+1 for recipients :/
_email
? – Harish Shettyemail.recipient
call should runselect * from users
if the recipient is not eager loaded. Are you sure you are seeingselect * from emails
multiple times? – Harish Shetty