update check user
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
class Settings::CommissionersController < ApplicationController
|
||||
load_and_authorize_resource except: [:create]
|
||||
before_action :set_commissioner, only: [:show, :edit, :update, :destroy]
|
||||
before_action :check_user
|
||||
|
||||
# GET /commissioners
|
||||
# GET /commissioners.json
|
||||
@@ -82,7 +83,11 @@ class Settings::CommissionersController < ApplicationController
|
||||
end
|
||||
render json: @transactions
|
||||
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_commissioner
|
||||
|
||||
Reference in New Issue
Block a user