More tiny fixes

This commit is contained in:
José Valim 2010-12-25 11:15:56 +01:00
parent 7759c8b3f3
commit 1cdb02bd54
3 changed files with 3 additions and 4 deletions

View File

@ -40,7 +40,7 @@ module Devise
def recall
env["PATH_INFO"] = attempted_path
flash.now[:alert] = i18n_message(warden_options[:message] || :invalid)
flash.now[:alert] = i18n_message(:invalid)
self.response = recall_app(warden_options[:recall]).call(env)
end

View File

@ -5,7 +5,6 @@
Warden::Manager.after_set_user do |record, warden, options|
if record && record.respond_to?(:active?) && !record.active?
warden.logout(options[:scope])
options.merge!(:message => record.inactive_message)
throw :warden, options
throw :warden, options.merge(:message => record.inactive_message)
end
end

View File

@ -13,7 +13,7 @@ Warden::Manager.after_set_user do |record, warden, options|
path_checker = Devise::PathChecker.new(warden.env, scope)
unless path_checker.signing_out?
warden.logout(scope)
throw :warden, :scope => scope, :message => :timeout
throw :warden, options.merge(:message => :timeout)
end
end