title: how do I write SQL in a ruby method?
body: <p>I would like to have a method called feed in my User model that returns all the entries from two tables (discussions, exchanges). </p>
  
  <p>In User.rb</p>
  
  <pre><code> def feed
      SELECT * FROM discussions, exchanges GROUP BY created_at
   end
  </code></pre>
  
  <p>This doesn't work, i get a problem in rails console </p>
  
  <pre><code> syntax error, unexpected ';', expecting '='
  </code></pre>
  
  <p>Can anyone show me how to write SQL in here? Basically I want to return and sort entries from two different tables..</p>