updae session error

This commit is contained in:
Aung Myo
2018-03-23 18:02:41 +06:30
parent 37f80a8ac6
commit 2a88bd4409
3 changed files with 20 additions and 3 deletions

View File

@@ -1,6 +1,12 @@
class Origami::QuickServiceController < ApplicationController
# before_action :set_dining, only: [:detail]
before_action :check_user
def check_user
if current_user.nil?
redirect_to root_path
end
end
def index
today = DateTime.now
day = Date.today.wday
@@ -211,6 +217,11 @@ class Origami::QuickServiceController < ApplicationController
end
end
def check_user
if current_user.nil?
redirect_to root_path
end
end
# this can always true
def check_order_with_booking(booking)
if booking.sale.sale_status == "completed" || booking.sale.sale_status == "new"