Start supplier product category speccing

This commit is contained in:
2013-12-15 17:55:14 +01:00
parent 65aa99cc1a
commit 85297bed4f
5 changed files with 59 additions and 3 deletions
@@ -47,7 +47,7 @@ module Suppliers
respond_to do |format|
if @product_category.save
format.html { redirect_to [:suppliers, @product_category], notice: t('action.create.successfull', model: ProductCategory.model_name.human) }
format.html { redirect_to [:suppliers, :product_categories], notice: t('action.create.successfull', model: ProductCategory.model_name.human) }
format.json { render json: @product_category, status: :created, location: @product_category }
else
format.html { render action: "new" }
@@ -63,7 +63,7 @@ module Suppliers
respond_to do |format|
if @product_category.update_attributes(params[:product_category])
format.html { redirect_to [:suppliers, @product_category], notice: t('action.update.successfull', model: ProductCategory.model_name.human) }
format.html { redirect_to [:suppliers, :product_categories], notice: t('action.update.successfull', model: ProductCategory.model_name.human) }
format.json { head :no_content }
else
format.html { render action: "edit" }