Skip to content

Commit

Permalink
Actually destroy promotion actions
Browse files Browse the repository at this point in the history
There's no need for soft-delete on promotion actions, now that we have
soft-delete on promotions.
  • Loading branch information
mamhoff committed Jan 25, 2024
1 parent 4f29bcb commit c00aa0d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def update

def destroy
@promotion_action = @promotion.actions.find(params[:id])
if @promotion_action.discard
if @promotion_action.destroy
flash[:success] =
t("spree.successfully_removed", resource: SolidusFriendlyPromotions::PromotionAction.model_name.human)
end
Expand Down
1 change: 0 additions & 1 deletion app/models/solidus_friendly_promotions/promotion_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module SolidusFriendlyPromotions
# by an event and determined to be eligible.
class PromotionAction < Spree::Base
include Spree::Preferences::Persistable
include Spree::SoftDeletable
include Spree::CalculatedAdjustments
include Spree::AdjustmentSource
before_destroy :remove_adjustments_from_incomplete_orders
Expand Down

0 comments on commit c00aa0d

Please sign in to comment.