diff --git a/app/controllers/base_origami_controller.rb b/app/controllers/base_origami_controller.rb index 64441590..86fb4ec3 100755 --- a/app/controllers/base_origami_controller.rb +++ b/app/controllers/base_origami_controller.rb @@ -25,11 +25,7 @@ class BaseOrigamiController < ActionController::Base end end - if token_status - if current_user.nil? - redirect_to root_path - end - else + if !token_status if current_user.nil? redirect_to root_path end diff --git a/app/controllers/origami/home_controller.rb b/app/controllers/origami/home_controller.rb index 79a86ea9..8e00ef80 100755 --- a/app/controllers/origami/home_controller.rb +++ b/app/controllers/origami/home_controller.rb @@ -3,10 +3,7 @@ class Origami::HomeController < BaseOrigamiController before_action :set_dining, only: [:show] def index - @webview = false - if check_mobile - @webview = true - end + @webview = check_mobile @tables = Table.all.active.order('status desc') @rooms = Room.all.active.order('status desc') @complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d')) @@ -18,10 +15,7 @@ class Origami::HomeController < BaseOrigamiController # origami table detail def show - @webview = false - if check_mobile - @webview = true - end + @webview = check_mobile @tables = Table.all.active.order('status desc') @rooms = Room.all.active.order('status desc') diff --git a/app/views/origami/home/index.html.erb b/app/views/origami/home/index.html.erb index 38f0cc79..5e280697 100755 --- a/app/views/origami/home/index.html.erb +++ b/app/views/origami/home/index.html.erb @@ -140,7 +140,11 @@