From 1cdb02bd54b31a9a4ed0788ca5458f2748ef1ce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 25 Dec 2010 11:15:56 +0100 Subject: [PATCH] More tiny fixes --- lib/devise/failure_app.rb | 2 +- lib/devise/hooks/activatable.rb | 3 +-- lib/devise/hooks/timeoutable.rb | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/devise/failure_app.rb b/lib/devise/failure_app.rb index 921cfa08..9127764f 100644 --- a/lib/devise/failure_app.rb +++ b/lib/devise/failure_app.rb @@ -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 diff --git a/lib/devise/hooks/activatable.rb b/lib/devise/hooks/activatable.rb index 55eac05a..c6314f22 100644 --- a/lib/devise/hooks/activatable.rb +++ b/lib/devise/hooks/activatable.rb @@ -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 \ No newline at end of file diff --git a/lib/devise/hooks/timeoutable.rb b/lib/devise/hooks/timeoutable.rb index 24422ee4..a323aafb 100644 --- a/lib/devise/hooks/timeoutable.rb +++ b/lib/devise/hooks/timeoutable.rb @@ -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