title: order by foreign key in activerecord
body: <p>I have a tables <code>Foo</code> and <code>Bar</code>. <code>Foo</code> has one <code>Bar</code>. When I query <code>Foo</code>, how can I order it by a date column in the <code>Bar</code> table?</p>
  
  <p>Thanks</p>