Promotion Destory Bug Fix

This commit is contained in:
Phyo
2017-09-05 10:44:33 +06:30
parent 6c94ba5457
commit f56b7ab26e

View File

@@ -69,6 +69,9 @@ class Settings::PromotionsController < ApplicationController
# DELETE /promotions/1
# DELETE /promotions/1.json
def destroy
@promotion.promotion_products.each do |pp|
pp.destroy
end
@promotion.destroy
respond_to do |format|
format.html { redirect_to settings_promotions_path, notice: 'Promotion was successfully destroyed.' }