title: Rails: order using a has_many/belongs_to relationship
body: <p>I was wondering if it was possible to use the find method to order the results based on a class's has_many relationship with another class. e.g.</p>
  
  <pre><code># has the columns id, name
  class Dog &lt; ActiveRecord::Base
    has_many :dog_tags
  end
  
  # has the columns id, color, dog_id
  class DogTags &lt; ActiveRecord::Base
    belongs_to :dog
  end
  </code></pre>
  
  <p>and I would like to do something like this:</p>
  
  <pre><code>@result = DogTag.find(:all, :order =&gt; dog.name)
  </code></pre>
  
  <p>thank you.</p>