many changes

This commit is contained in:
2012-12-03 18:39:36 +01:00
parent e3dc6a7c68
commit 7d64ab2022
37 changed files with 540 additions and 101 deletions
@@ -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