Sha256: 558d913f5a7dafd260d6ea67ba43271fcb9b23fb54e62fec62cbd6a93fbba560

Contents?: true

Size: 423 Bytes

Versions: 22

Compression:

Stored size: 423 Bytes

Contents

# frozen_string_literal: true

module Devise
  # Checks the scope in the given environment and returns the associated failure app.
  class Delegator
    def call(env)
      failure_app(env).call(env)
    end

    def failure_app(env)
      app = env["warden.options"] &&
        (scope = env["warden.options"][:scope]) &&
        Devise.mappings[scope.to_sym].failure_app

      app || Devise::FailureApp
    end
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/devise-4.9.4/lib/devise/delegator.rb
devise-4.9.4 lib/devise/delegator.rb
devise-4.9.3 lib/devise/delegator.rb
devise-4.9.2 lib/devise/delegator.rb
devise-4.9.1 lib/devise/delegator.rb
devise-4.9.0 lib/devise/delegator.rb
devise-4.8.1 lib/devise/delegator.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/devise-4.8.0/lib/devise/delegator.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/devise-4.8.0/lib/devise/delegator.rb
devise-4.8.0 lib/devise/delegator.rb
devise-4.7.3 lib/devise/delegator.rb
devise-4.7.2 lib/devise/delegator.rb
devise-4.7.1 lib/devise/delegator.rb
devise-4.7.0 lib/devise/delegator.rb
devise-4.6.2 lib/devise/delegator.rb
devise-4.6.1 lib/devise/delegator.rb
devise-4.6.0 lib/devise/delegator.rb
devise-4.5.0 lib/devise/delegator.rb
devise-4.4.3 lib/devise/delegator.rb
devise-4.4.2 lib/devise/delegator.rb