Promotion Destory Bug Fix
This commit is contained in:
@@ -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.' }
|
||||
|
||||
Reference in New Issue
Block a user