update check user
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
class Transactions::OrdersController < ApplicationController
|
||||
load_and_authorize_resource except: [:create]
|
||||
before_action :check_user
|
||||
|
||||
def index
|
||||
|
||||
filter = params[:filter]
|
||||
@@ -39,4 +41,10 @@ class Transactions::OrdersController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def check_user
|
||||
if current_user.nil?
|
||||
redirect_to root_path
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user