title: Rails order records by column and custom method
body: <p>For one of my models I'm trying to set a default scope that sorts by year and season. Since year is an integer, it's easy to order by that. My trouble is ordering by season (if the year is the same). Here's just ordering by year:</p>
  
  <pre><code>class League &lt; ActiveRecord::Base
    def self.default_scope
      order(:year)
    end
  
    # The season's that are allowed to be used
    # This is also the order I'd like to use
    def self.season_collection
      {
        "Spring" =&gt; "Spring",
        "Summer" =&gt; "Summer",
        "Fall"   =&gt; "Fall"
      }
    end
  end
  </code></pre>
  
  <p>If I try <code>order(:year, :season)</code> then that will just do it alphabetically. Is there any way to use <code>order</code> (so it's done on the database end)?</p>