update check user

This commit is contained in:
Aung Myo
2018-03-22 12:42:17 +06:30
parent fbbe2c0ab9
commit 75a3576a77
10 changed files with 74 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
class Settings::OrderQueueStationsController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_settings_order_queue_station, only: [:show, :edit, :update, :destroy]
before_action :check_user
# GET /settings/order_queue_stations
# GET /settings/order_queue_stations.json
@@ -67,6 +68,12 @@ class Settings::OrderQueueStationsController < ApplicationController
# end
end
def check_user
if current_user.nil?
redirect_to root_path
end
end
private
# Use callbacks to share common setup or constraints between actions.
def set_settings_order_queue_station