Created
December 29, 2010 03:44
-
-
Save dirkkelly/758133 to your computer and use it in GitHub Desktop.
Using 2.3.x named_scopes for @mariovisic drafting question
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Version | |
named_scope :drafts, :conditions => { :draft => true } | |
named_scope :published, :conditions => { :draft => false } | |
end | |
Version.drafts # all drafts | |
Version.published # all published |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment