KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
If I do this post = Post.find_by_id(post_id, :include => :comments) two queries are performed (one for post data and and another for the post's comments). Then when I do post.comments, another query is not performed because data is already cached. Is there a way to do just one query and still access the comments via post.comments?
Tags (comma-separated)
Save Edits
Cancel