title: Rails Union Queries
body: <p>How can I execute a union (outer join) query in rails/active record?</p>
  
  <pre><code>...
      FROM `parents`
      LEFT JOIN `child` on parents.child_id = child.id
  UNION
  ...
      FROM `parents`
      RIGHT JOIN `child` on parents.child_id = child.id
  
  ORDER BY rate desc, grade desc, date desc;
  </code></pre>
  
  <p>..using Model.joins() ?</p>