Mailinglist Archive: yast-commit (2114 mails)

< Previous Next >
[yast-commit] <web-client> master : Catch InvalidAuthenticationToken exception (caused by disabled cookies)
  • From: Klaus Kämpf <kkaempf@xxxxxxx>
  • Date: Mon, 14 Sep 2009 12:00:56 +0200
  • Message-id: <E1MrV8c-0001G0-GI@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit 429b06f647f0999ac49e258d9721d42b167e07e5
Author: Klaus Kämpf <kkaempf@xxxxxxx>
Date: Mon Sep 14 12:00:56 2009 +0200

Catch InvalidAuthenticationToken exception (caused by disabled cookies)
---
.../app/controllers/application_controller.rb | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/webclient/app/controllers/application_controller.rb
b/webclient/app/controllers/application_controller.rb
index 8ba474f..b08acba 100644
--- a/webclient/app/controllers/application_controller.rb
+++ b/webclient/app/controllers/application_controller.rb
@@ -24,8 +24,13 @@ class ApplicationController < ActionController::Base
def exception_trap(e)
logger.error "***" + e.to_s
@error = e
- #render :text => "I am sorry"
- render :template => "shared/exception_trap"
+ case @error
+ when ActionController::InvalidAuthenticityToken
+ render :template => "shared/cookies_disabled"
+ else
+ #render :text => "I am sorry"
+ render :template => "shared/exception_trap"
+ end
return
end

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages