supplier client sections working with problematic authentication still active
This commit is contained in:
@@ -53,6 +53,7 @@ module Suppliers
|
||||
def destroy
|
||||
#@product_variant = ProductVariant.find_by_supplier_id_and_id!(current_supplier.id, params[:id])
|
||||
@product_variant = ProductVariant.find(params[:id])
|
||||
head :forbidden and return unless @product_variant.supplier_id == current_supplier.id
|
||||
@product_variant.destroy
|
||||
head :no_content
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user