check orgami js
This commit is contained in:
@@ -38,13 +38,18 @@ 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
|
||||
end
|
||||
session[:session_token] = token
|
||||
end
|
||||
|
||||
if session[:session_token] && request.user_agent =~ /android|blackberry|iphone|ipad|ipod|iemobile|mobile|webos/i
|
||||
status = true
|
||||
|
||||
if token_status && request.user_agent =~ /android|blackberry|iphone|ipad|ipod|iemobile|mobile|webos/i
|
||||
status = true
|
||||
end
|
||||
|
||||
return status
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class Origami::HomeController < BaseOrigamiController
|
||||
authorize_resource :class => false
|
||||
before_action :set_dining, only: [:show]
|
||||
before_action :set_dining, only: [:show]
|
||||
|
||||
def index
|
||||
@webview = false
|
||||
|
||||
Reference in New Issue
Block a user