From 3cebd229c9c9909fce1a6c60df5ff0e4e9776054 Mon Sep 17 00:00:00 2001 From: Robbe Van Herck Date: Mon, 22 Apr 2019 15:35:57 +0200 Subject: [PATCH] Display barcodes with api token --- app/controllers/barcodes_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/barcodes_controller.rb b/app/controllers/barcodes_controller.rb index 549c278..a2d29f5 100644 --- a/app/controllers/barcodes_controller.rb +++ b/app/controllers/barcodes_controller.rb @@ -10,8 +10,8 @@ # class BarcodesController < ApplicationController - load_and_authorize_resource :product, only: :create - load_and_authorize_resource :barcode, through: :product, shallow: true + load_and_authorize_resource :product, only: :create, except: :index + load_and_authorize_resource :barcode, through: :product, shallow: true, except: :index def create @barcode.save