Skip to content

Commit

Permalink
Consider script name in PathChecker.
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Jul 6, 2010
1 parent 77b7692 commit e2a4ebc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion devise.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
5 changes: 3 additions & 2 deletions lib/devise/path_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ class PathChecker
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
2 changes: 1 addition & 1 deletion lib/devise/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Engine < ::Rails::Engine
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
Expand Down

0 comments on commit e2a4ebc

Please sign in to comment.