From 11b1b02b5952cab7da943854fa4167051205a29e Mon Sep 17 00:00:00 2001 From: yarzar_code Date: Thu, 27 Aug 2020 17:09:13 +0630 Subject: [PATCH] replace employee.role to current user.role --- app/controllers/home_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index a5eb11b3..47ccbf62 100755 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -38,7 +38,7 @@ private reports_dailysale_index_path elsif @current_user.role == "kitchen" oqs_root_path - elsif employee.role == "foodcourt_cashier" + elsif @current_user.role == "foodcourt_cashier" #check if cashier has existing open cashier shift = ShiftSale.current_open_shift(employee) if !shift.nil?