Skip to content

Instantly share code, notes, and snippets.

@matthuhiggins
Created May 28, 2010 07:38
Show Gist options
  • Save matthuhiggins/416885 to your computer and use it in GitHub Desktop.
Save matthuhiggins/416885 to your computer and use it in GitHub Desktop.
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