Displaying 3 results from an estimated 3 matches for "local_scope".
Did you mean:
local_copy
2011 Jul 11
2
Can't get this Rspec test to pass
...;s the catch - we have this groovy little plugin that globally enforces
a model scope via a session id, in this case: session[:operation_id].
Here''s the code for the plugin:
[code]
module ApplicationScopeManager
mattr_accessor :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_mana...
2006 Nov 01
17
So how can I rewrite my app without using with_scope?
So, I hear that with_scope is going to be deprecated.
Which is a bit of a shame, given the stuff I''ve been writing recently.
I have a CMS with multiple clients. A ''client'' is essentially a
company, with multiple users. Content on the site belongs to a client
- content could be messages, images, schedules, etc etc. People
belonging to one client should not be able
2007 May 08
3
assert_difference eval magic in [6693]
I just saw Marcel''s change to assert_difference that changes the
method API to take a string param that is evaled in a lambda.
http://dev.rubyonrails.org/changeset/6693
I much preferred the old API, since it''s simple enough to pass a
lambda. Passing a string means the lambda is in the wrong scope and
doesn''t have access to objects in the test case scope.
For an