title: Getting ids from both tables of a join ActiveRecord_AssociationRelation
body: <p>Let's say I have a <code>ActiveRecord_AssociationRelation</code> named <code>joined</code> obtained from joining 2 tables <code>users</code> and <code>posts</code>.
  I would like to select the ids from both the user and the post and place them turn them to a hash by calling <code>as_json</code>.
  Basically I would like to do something like this:</p>
  
  <pre><code>joined.select('users.id','posts.id')
  # joined.select('posts.id','users.id')
  joined.as_json
  </code></pre>
  
  <p>The code above returns only the last id argument mentioned in the select method( the post id in the first case and the user id in the commented case).</p>
  
  <p>I would like to know if it's possible to get both ids or if Rails's Convention over Configuration principles restrict us to get both in this way( so that we might return the :user_id column instead for example)?</p>