mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
14 lines
326 B
Ruby
14 lines
326 B
Ruby
module Devise
|
|
class PathChecker
|
|
include Rails.application.routes.url_helpers
|
|
|
|
def initialize(env, scope)
|
|
@current_path = "/#{env["SCRIPT_NAME"]}/#{env["PATH_INFO"]}".squeeze("/")
|
|
@scope = scope
|
|
end
|
|
|
|
def signing_out?
|
|
@current_path == send("destroy_#{@scope}_session_path")
|
|
end
|
|
end
|
|
end
|