Load barcode through product

This commit is contained in:
benji 2015-10-07 15:34:22 +02:00
parent 0baa857458
commit c8b21ed1d1

View file

@ -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