From cf4cb740878030a8ee2350285ad2e72fdba75fe6 Mon Sep 17 00:00:00 2001 From: benji Date: Wed, 7 Oct 2015 16:39:06 +0200 Subject: [PATCH] authorization --- 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 043b253..5d1f56a 100644 --- a/app/controllers/barcodes_controller.rb +++ b/app/controllers/barcodes_controller.rb @@ -1,6 +1,6 @@ class BarcodesController < ApplicationController - load_and_authorize_resource :product - load_and_authorize_resource :barcode, through: :product, shallow: true + load_and_authorize_resource :product, only: :create + load_and_authorize_resource :barcode, through: :product, only: :create def create @barcode.save