Class: Devise::PathChecker

Inherits:
Object
  • Object
show all
Defined in:
lib/devise/path_checker.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env, scope) ⇒ PathChecker

Returns a new instance of PathChecker.



9
10
11
12
# File 'lib/devise/path_checker.rb', line 9

def initialize(env, scope)
  @current_path = "/#{env["SCRIPT_NAME"]}/#{env["PATH_INFO"]}".squeeze("/")
  @scope = scope
end

Class Method Details

.default_url_options(*args) ⇒ Object



5
6
7
# File 'lib/devise/path_checker.rb', line 5

def self.default_url_options(*args)
  ApplicationController.default_url_options(*args)
end

Instance Method Details

#signing_out?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/devise/path_checker.rb', line 14

def signing_out?
  @current_path == send("destroy_#{@scope}_session_path")
end