authorization

This commit is contained in:
benji 2015-10-07 16:39:06 +02:00
parent 3fc7f9f884
commit cf4cb74087

View file

@ -1,6 +1,6 @@
class BarcodesController < ApplicationController class BarcodesController < ApplicationController
load_and_authorize_resource :product load_and_authorize_resource :product, only: :create
load_and_authorize_resource :barcode, through: :product, shallow: true load_and_authorize_resource :barcode, through: :product, only: :create
def create def create
@barcode.save @barcode.save