-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add store promotion rule #2552
Add store promotion rule #2552
Conversation
promotable.is_a?(Spree::Order) | ||
end | ||
|
||
def eligible?(order, options = {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused method argument - options. If it's necessary, use _ or _options as an argument name to indicate that it won't be used.
Introduces a new promotion rule (originally part of `solidus_multi_domain`) that allows for scoping promotions to specific stores.
end | ||
|
||
def eligible?(order, _options = {}) | ||
stores.none? || stores.include?(order.store) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems really weird to check stores.none?
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a little odd. I'm not sure why it was originally written this way in solidus_multi_domain
, but I figured it would be best to keep it the same.
Thanks |
Introduces a new promotion rule (originally part of
solidus_multi_domain
) that allows for scoping promotions to specific stores.