title: activerecord - how to get all column of joined tables
body: <p>After reading   : <a href="http://guides.rubyonrails.org/active_record_querying.html#using-array-hash-of-named-associations" rel="nofollow noreferrer">this</a></p>
  
  <p>I still don't get it.   in console:</p>
  
  <pre><code>puts Category.joins(:posts)
  </code></pre>
  
  <p>It perform join or left join on Category and Post.</p>
  
  <p>However, all data returned is just columns in Category table.  How to  also get those column data in Post. ? </p>
  
  <p>should I  make another model to achieve this ?   </p>
  
  <p>after reading: <a href="https://stackoverflow.com/questions/4566521/rails-joins-and-include-columns-from-joins-table">this</a>
  Is find_by_SQL is the only way ?  I want ActiveRecord way if possible.</p>
  
  <p>Thanks.</p>