-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Alias NullPromotionHandler#activate to #apply
The four promotion handlers in core have two different methods to set them into motion. Cart, Shipping, and Page use #activate, but Coupon uses #apply. We only need one null promotion handler, and since we just want it to return the unchanged promotion, we just alias.
- Loading branch information
Showing
2 changed files
with
9 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ def initialize(order) | |
def activate | ||
@order | ||
end | ||
alias_method :apply, :activate | ||
|
||
def can_apply? | ||
true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters