supplier menu progress
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user