class Devise::PathChecker

Public Class Methods

default_url_options(*args) click to toggle source
# File lib/devise/path_checker.rb, line 5
def self.default_url_options(*args)
  if defined?(ApplicationController)
    ApplicationController.default_url_options(*args)
  else
    {}
  end
end
new(env, scope) click to toggle source
# File lib/devise/path_checker.rb, line 13
def initialize(env, scope)
  @current_path = "/#{env["SCRIPT_NAME"]}/#{env["PATH_INFO"]}".squeeze("/")
  @scope = scope
end

Public Instance Methods

signing_out?() click to toggle source
# File lib/devise/path_checker.rb, line 18
def signing_out?
  route = "destroy_#{@scope}_session_path"
  respond_to?(route) && @current_path == send(route)
end