Skip to content

Instantly share code, notes, and snippets.

@tammersaleh
Created July 1, 2010 22:33
Show Gist options
  • Save tammersaleh/460670 to your computer and use it in GitHub Desktop.
Save tammersaleh/460670 to your computer and use it in GitHub Desktop.
module MyScopes
def self.included(base)
base.send(:scope, :blue, lambda { where("color = blue") })
end
end
class ActiveRecord::Base
include MyScopes
end
...activerecord-3.0.0.beta4/lib/active_record/base.rb:1236:in `class_of_active_record_descendant': undefined method `abstract_class?' for Object:Class (NoMethodError)
undefined method `where' for MyScopes:Module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment