title: Rails 3 - default_scope
body: <p>I would like to order the article tags on my index page by popularity as opposed to by creation date i.e. the tags with the most amount of articles in them from highest to lowest. My model is as follows?</p>
  
  <pre><code>class Tag &lt; ActiveRecord::Base
  
    attr_accessible :name
    validates :name, :uniqueness =&gt; true
  
    # order by creation
    default_scope :order =&gt; 'created_at DESC'
  
    has_many :taggings, :dependent =&gt; :destroy  
    has_many :articles, :through =&gt; :taggings
    end
  </code></pre>