nested form

This commit is contained in:
Nweni
2017-08-22 14:11:13 +06:30
parent 7d60ab1a95
commit 44f02be4cb
3 changed files with 22 additions and 58 deletions

View File

@@ -71,6 +71,7 @@ class Settings::PromotionsController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def promotion_params
params.require(:promotion).permit(:promo_code, :promo_start_date, :promo_end_date, :promo_start_hour,:promo_end_hour ,:promo_day, :promo_type,:original_product ,:min_qty ,:created_by,:promotion_products_attributes => [:item_code, :min_qty, :net_off, :net_price, :percentage, :_destroy])
params.require(:promotion).permit(:promo_code, :promo_start_date, :promo_end_date, :promo_start_hour,:promo_end_hour ,:promo_day, :promo_type,:original_product ,:min_qty ,:created_by,
:promotion_products_attributes => [:item_code, :min_qty, :net_off, :net_price, :percentage, :_destroy])
end
end