title: in Rails how to select additional columns from multiple tables
body: <p>I have these associations to describe a model where there is a list of Tags in the application (gardening, tutoring etc.. ) and a User will have 1 or more of these.  My best guess is the associations below</p>
  <p><strong>User</strong></p>
  <blockquote>
  <p>has_many :<strong>usertags</strong></p>
  <p>has_many :<strong>tags</strong>, through: :<strong>usertags</strong></p>
  </blockquote>
  <p><strong>Tag</strong></p>
  <blockquote>
  <p>has_many :<strong>user</strong> tags</p>
  <p>has_many :<strong>users</strong>, through: :<strong>usertags</strong></p>
  </blockquote>
  <p><strong>Usertag</strong></p>
  <blockquote>
  <p>belongs_to :<strong>user</strong></p>
  <p>belongs_to :<strong>tag</strong></p>
  </blockquote>
  <p>I added the columns for user_id and tag_id to Usertag. I can setup the data and retrieve the list of tags for a user via</p>
  <p>User.first.usertags for example.</p>
  <p>How do I retrieve the Tag.name, User.id, and Usertag.id properties,  I tried this format</p>
  <pre><code>User.first.usertags.joins(:tag).select(&quot;tags.name, tags.id, usertags.id, user.id&quot;)
  </code></pre>
  <p>in my result all I see is</p>
  <pre><code>[#&lt;Usertag id:1&gt;, #&lt;Usertag id:3&gt;]&gt;
  </code></pre>
  <p>Many thanks!</p>