Class: Devise::Strategies::Base
- Inherits:
-
Warden::Strategies::Base
- Object
- Warden::Strategies::Base
- Devise::Strategies::Base
- Defined in:
- lib/devise/strategies/base.rb
Overview
Base strategy for Devise. Responsible for verifying correct scope and mapping.
Direct Known Subclasses
Instance Method Summary collapse
-
#mapping ⇒ Object
Checks if a valid scope was given for devise and find mapping based on this scope.
-
#store? ⇒ Boolean
Whenever CSRF cannot be verified, we turn off any kind of storage.
Instance Method Details
#mapping ⇒ Object
Checks if a valid scope was given for devise and find mapping based on this scope.
11 12 13 14 15 16 17 |
# File 'lib/devise/strategies/base.rb', line 11 def mapping @mapping ||= begin mapping = Devise.mappings[scope] raise "Could not find mapping for #{scope}" unless mapping mapping end end |
#store? ⇒ Boolean
Whenever CSRF cannot be verified, we turn off any kind of storage
6 7 8 |
# File 'lib/devise/strategies/base.rb', line 6 def store? !env["devise.skip_storage"] end |