diff --git a/app/controllers/barcodes_controller.rb b/app/controllers/barcodes_controller.rb index c0fcf57..d6782a1 100644 --- a/app/controllers/barcodes_controller.rb +++ b/app/controllers/barcodes_controller.rb @@ -1,5 +1,6 @@ class BarcodesController < ApplicationController - load_and_authorize_resource :barcode, shallow: true + load_and_authorize_resource :product + load_and_authorize_resource :barcode, through: :product def create @barcode.save