1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00
heartcombo--devise/lib/devise/path_checker.rb

15 lines
326 B
Ruby
Raw Normal View History

module Devise
class PathChecker
include Rails.application.routes.url_helpers
2010-06-13 06:40:40 -04:00
def initialize(env, scope)
2010-07-06 08:58:40 -04:00
@current_path = "/#{env["SCRIPT_NAME"]}/#{env["PATH_INFO"]}".squeeze("/")
@scope = scope
end
def signing_out?
2010-07-06 08:58:40 -04:00
@current_path == send("destroy_#{@scope}_session_path")
end
end
end