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

Consider script name in PathChecker.

This commit is contained in:
José Valim 2010-07-06 14:58:40 +02:00
parent 77b7692b57
commit e2a4ebce4a
3 changed files with 5 additions and 4 deletions

View file

@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Jos\303\251 Valim", "Carlos Ant\303\264nio"]
s.date = %q{2010-07-04}
s.date = %q{2010-07-06}
s.description = %q{Flexible authentication solution for Rails with Warden}
s.email = %q{contact@plataformatec.com.br}
s.extra_rdoc_files = [

View file

@ -3,11 +3,12 @@ module Devise
include Rails.application.routes.url_helpers
def initialize(env, scope)
@env, @scope = env, scope
@current_path = "/#{env["SCRIPT_NAME"]}/#{env["PATH_INFO"]}".squeeze("/")
@scope = scope
end
def signing_out?
@env["PATH_INFO"] == send("destroy_#{@scope}_session_path")
@current_path == send("destroy_#{@scope}_session_path")
end
end
end

View file

@ -20,7 +20,7 @@ module Devise
Devise.encryptor ||= begin
warn "[WARNING] config.encryptor is not set in your config/initializers/devise.rb. " \
"Devise will then set it to :bcrypt. If you were using the previous default " \
"encryptor, please add config.encryptor = :sha1 to your configuration file."
"encryptor, please add config.encryptor = :sha1 to your configuration file." if Devise.mailer_sender
:bcrypt
end
end