ref: refs/heads/network
commit 429b06f647f0999ac49e258d9721d42b167e07e5
Author: Klaus Kämpf
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@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org