Module: Authlogic::Session::Scopes::ClassMethods
- Defined in:
- lib/authlogic/session/scopes.rb
Overview
Scopes
Instance Method Summary collapse
-
#scope ⇒ Object
The current scope set, should be used in the block passed to with_scope.
-
#with_scope(options = {}, &block) ⇒ Object
See the documentation for this class for more information on how to use this method.
Instance Method Details
#scope ⇒ Object
The current scope set, should be used in the block passed to with_scope.
59 60 61 |
# File 'lib/authlogic/session/scopes.rb', line 59 def scope Thread.current[:authlogic_scope] end |
#with_scope(options = {}, &block) ⇒ Object
See the documentation for this class for more information on how to use this method.
64 65 66 67 68 69 70 |
# File 'lib/authlogic/session/scopes.rb', line 64 def with_scope( = {}, &block) raise ArgumentError.new("You must provide a block") unless block_given? self.scope = result = yield self.scope = nil result end |