-
-
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
Allowing admin to show all countries regardless checkout zone #2588
Allowing admin to show all countries regardless checkout zone #2588
Conversation
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.
Thanks. Makes much sense!
Could we use a named parameter to increase the readability?
@@ -106,8 +106,8 @@ def taxons_tree(root_taxon, current_taxon, max_level = 1) | |||
end | |||
end | |||
|
|||
def available_countries | |||
checkout_zone = Zone.find_by(name: Spree::Config[:checkout_zone]) | |||
def available_countries(zone_name = Spree::Config[:checkout_zone]) |
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.
I would like to have a more meaningful parameter here. Just passing nil
to restrict the countries to a specific zone seams unintuitive to me.
Maybe something like?
def available_countries(restrict_to_zone: Spree::Config[:checkout_zone])
2f8efc8
to
27eec5b
Compare
27eec5b
to
9d6722c
Compare
Done! let me know if it still makes sense. Thanks! |
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.
Thank you
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.
Thanks!
Thank you! |
Fixes #2562