title: Get columns names with ActiveRecord
body: <p>Is there a way to get the actual columns name with ActiveRecord?</p>
  
  <p>When I call find_by_sql or select_all with a join, if there are columns with the same name, the first one get overridden:</p>
  
  <pre><code>select locations.*, s3_images.* from locations left join s3_images on s3_images.imageable_id = locations.id and s3_images.imageable_type = 'Location' limit 1
  </code></pre>
  
  <p>In the example above, I get the following:</p>
  
  <pre><code>#&lt;Location id: 22, name: ... 
  &gt;
  </code></pre>
  
  <p>Where id is that of the last s3_image. select_rows is the only thing that worked as expected:</p>
  
  <pre><code>Model.connection.select_rows("SELECT id,name FROM users") =&gt; [["1","amy"],["2","bob"],["3","cam"]]
  </code></pre>
  
  <p>I need to get the field names for the rows above.
  This post gets close to what I want but looks outdated (fetch_fields doesn't seem to exist anymore <a href="https://stackoverflow.com/questions/1690248/how-do-you-get-the-rows-and-the-columns-in-the-result-of-a-query-with-activereco">How do you get the rows and the columns in the result of a query with ActiveRecord?</a> )</p>
  
  <p>The ActiveRecord join method creates multiple objects. I'm trying to achieve the same result "includes" would return but with a left join.</p>
  
  <p>I am attempting to return a whole lot of results (and sometimes whole tables) this is why includes does not suit my needs.</p>