title: rails scope order by atribute of parent
body: <p>Let's say I have a class Foo which belongs_to :bar.</p>
  
  <p>Bar has an attribute name. I want to create a scope that orders Foos by bar.name. How do I do that with scope?</p>
  
  <p>Like,
  scope :by_name, order('')?</p>
  
  <p>I am very new to rails so I am sorry if this question does not make sense.</p>