Created
May 28, 2010 07:38
-
-
Save matthuhiggins/416885 to your computer and use it in GitHub Desktop.
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
module Awesomeness | |
extend ActiveSupport::Concern | |
included do | |
scope :awesome, where(:favorite_language => 'ruby') | |
end | |
module ClassMethods | |
def make_everyone_awesome | |
update_all(:favorite_language => 'ruby') | |
end | |
end | |
def awesome? | |
favorite_language == 'ruby' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment