title: Is there a way to have one SQL query using ActiveRecord instead of two when calling an association on an association?
body: <p>Assume we have users, posts, and comments. Users have many posts, posts have many comments and belong to a user. Comments only belong to posts.</p>
  
  <p>Assume I have a comment, and I want to get the user associated to the post.</p>
  
  <p>I could do: <code>comment.post.user</code>.</p>
  
  <p>What this does is fire off 2 SQL queries (unless the post is already cached):</p>
  
  <pre><code>Post Load (0.8ms)  SELECT  "posts".* FROM "posts"  WHERE "posts"."id" = $1 LIMIT 1  [["id", 1]]
  User Load (0.4ms)  SELECT  "users".* FROM "users"  WHERE "users"."id" = $1 LIMIT 1  [["id", 1]]
  </code></pre>
  
  <p>Now, I'm not asking if it is possible to make one SQL query for this. I know it is. Is there a way through ActiveRecord to have only one query be made?</p>
  
  <p>I suppose it may not even be a big deal if the above is done in a transaction, but I doubt it is. </p>