title: How to order by a related model in default scope? -- Rails 3.1
body: <p><strong>How can I write the following default scope:</strong></p>
  
  <pre><code>class SimilarMerchant &lt; ActiveRecord::Base
  
    # relationships
    belongs_to :merchant
    belongs_to :similar_merchant, :foreign_key =&gt; 'similar_merchant_id', :class_name =&gt; "Merchant"
  
    # scopes
    default_scope order('merchants.is_paid DESC').order('score DESC')
  
  end
  </code></pre>
  
  <p>Basically I want to sort by a <code>merchant.is_paid</code> field (which belongs to a related model)</p>
  
  <p><strong>Any advice?</strong></p>