diff --git a/app/controllers/base_origami_controller.rb b/app/controllers/base_origami_controller.rb index 828d0787..b627ae01 100755 --- a/app/controllers/base_origami_controller.rb +++ b/app/controllers/base_origami_controller.rb @@ -38,15 +38,14 @@ class BaseOrigamiController < ActionController::Base #check webview def check_mobile status = false - token_status = false authenticate_with_http_token do |token, options| if token - token_status = true + session[:webview] = true end session[:session_token] = token end - if token_status && request.user_agent =~ /android|blackberry|iphone|ipad|ipod|iemobile|mobile|webos/i + if session[:webview] && request.user_agent =~ /android|blackberry|iphone|ipad|ipod|iemobile|mobile|webos/i status = true end