many changes
This commit is contained in:
@@ -4,7 +4,7 @@ module Suppliers
|
||||
# GET /products
|
||||
# GET /products.json
|
||||
def index
|
||||
@products = current_supplier.products
|
||||
@products = ProductDecorator.decorate(current_supplier.products)
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
@@ -15,7 +15,7 @@ module Suppliers
|
||||
# GET /products/1
|
||||
# GET /products/1.json
|
||||
def show
|
||||
@product = Product.find(params[:id])
|
||||
@product = ProductDecorator.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
@@ -27,7 +27,6 @@ module Suppliers
|
||||
# GET /products/new.json
|
||||
def new
|
||||
@product = Product.new
|
||||
@product.product_category_id = params[:product_category_id].presence
|
||||
|
||||
respond_to do |format|
|
||||
format.html # new.html.erb
|
||||
|
||||
Reference in New Issue
Block a user