Skip to content

Commit

Permalink
Remove deprecated Spree::PromotionRule#for
Browse files Browse the repository at this point in the history
Please select promotion rules by their applicable status on
the promotable instead.

Ref solidusio#4284
  • Loading branch information
kennyadsl committed Mar 22, 2023
1 parent 0b5c5bc commit 36cb350
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions core/app/models/spree/promotion_rule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ def preload_relations
[]
end

def self.for(promotable)
all.select { |rule| rule.applicable?(promotable) }
end
deprecate :for, "Please select promotion rules by their applicable status on the promotable instead."

def applicable?(_promotable)
raise NotImplementedError, "applicable? should be implemented in a sub-class of Spree::PromotionRule"
end
Expand Down

0 comments on commit 36cb350

Please sign in to comment.