Skip to content

Instantly share code, notes, and snippets.

@arwagner
Created May 11, 2013 23:02
Show Gist options
  • Save arwagner/5561738 to your computer and use it in GitHub Desktop.
Save arwagner/5561738 to your computer and use it in GitHub Desktop.
class Article < ActiveRecord::Base
scope :published, where(:published => true)
scope :in_order, order('published_at desc')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment