Better supplier ember section workflow

This commit is contained in:
2014-07-02 15:44:51 +02:00
parent 8ab355460c
commit 627e0e891d
14 changed files with 115 additions and 6 deletions
@@ -61,7 +61,7 @@ module Suppliers
respond_to do |format|
if @section.save
format.html { redirect_to [:suppliers, @section], notice: t('action.create.successfull', model: Section.model_name.human) }
format.json { render json: @section, status: :created, location: @section }
format.json { render json: @section, serializer: SupplierSectionSerializer, status: :created }
else
format.html { render action: "new" }
format.json { render json: @section.errors, status: :unprocessable_entity }