update check user
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
class Transactions::CreditNotesController < ApplicationController
|
||||
|
||||
before_action :set_transactions_sale, only: [:show, :edit, :update, :destroy]
|
||||
before_action :check_user
|
||||
|
||||
# GET /transactions/sales
|
||||
# GET /transactions/sales.json
|
||||
@@ -25,12 +26,18 @@ class Transactions::CreditNotesController < ApplicationController
|
||||
@credit_notes = 0
|
||||
end
|
||||
end
|
||||
puts "sssssssssssss"
|
||||
puts @credit_notes.to_json
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
format.json { render json: @credit_notes }
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def check_user
|
||||
if current_user.nil?
|
||||
redirect_to root_path
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user