class Devise::Strategies::Base

Base strategy for Devise. Responsible for verifying correct scope and mapping.

Public Instance Methods

mapping() click to toggle source

Checks if a valid scope was given for devise and find mapping based on this scope.

# 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?() click to toggle source

Whenever CSRF cannot be verified, we turn off any kind of storage

# File lib/devise/strategies/base.rb, line 6
def store?
  !env["devise.skip_storage"]
end