supplier menu progress

This commit is contained in:
2014-11-24 18:20:10 +01:00
parent 148a0a2815
commit 1707f4d19f
37 changed files with 7356 additions and 6046 deletions
@@ -92,7 +92,7 @@ module Suppliers
respond_to do |format|
if @product_category.update_attributes(product_category_params)
format.html { redirect_to [:suppliers, :product_categories], notice: t('action.update.successfull', model: ProductCategory.model_name.human) }
format.json { head :no_content }
format.json { render json: @product_category }
else
format.html { render action: "edit" }
format.json { render json: @product_category.errors, status: :unprocessable_entity }
@@ -124,7 +124,9 @@ module Suppliers
private
def product_category_params
params.require(:product_category).permit(:name, :start_from, :end_on, :full_day, product_ids: [], week_days: [])
params.require(:product_category).permit(:name, :start_from, :end_on, :full_day, :position,
:active_on_sunday, :active_on_monday, :active_on_tuesday, :active_on_wednesday, :active_on_thursday, :active_on_friday, :active_on_saturday,
product_ids: [])
end
end
end