Displaying 1 result from an estimated 1 matches for "acts_as_scope_manag".
Did you mean:
acts_as_scope_manager
2011 Jul 11
2
Can't get this Rspec test to pass
...:global_scope
@@global_scope = []
mattr_accessor :local_scope
@@local_scope = {}
def self.included(base)
base.send :extend, ClassMethods
end
def self.setup
yield self
end
module ClassMethods
def method_missing(name, *args, &block)
return acts_as_scope_manager($1, args) if name.to_s =~
/^acts_as_scope_manager_for_(.*)/
return honors_scope_of($1, args) if name.to_s =~
/^honors_scope_of_(.*)/
return current_scope_for($1) if name.to_s =~
/^current_scope_for_(.*)/
super
end
def current_s...