-
-
Notifications
You must be signed in to change notification settings - Fork 729
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
Uk/hub closed new #1522
Uk/hub closed new #1522
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.
Good work, but there are two things I would like to have solved before merging. They are so small that I can quickly do it myself.
@@ -1,7 +1,7 @@ | |||
module OpenFoodNetwork | |||
class EnterpriseInjectionData | |||
def active_distributors | |||
@active_distributors ||= Enterprise.distributors_with_active_order_cycles | |||
@active_distributors ||= Enterprise.distributors_with_active_order_cycles.andand.ready_for_checkout |
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.
The andand
is not needed for scopes.
app/controllers/base_controller.rb
Outdated
|
||
def ensure_shop_ready | ||
# Don't display order cycles if shop is not ready for checkout | ||
@order_cycles = {} unless @distributor.ready_for_checkout? |
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 doesn't seem wise to me to first query order cycles and then just forget about them. We can check that pre-condition first, right?
My suggested changes are in Matt-Yorkley#6. Hope to merge this next week. |
Merging mklink's updates
Merged in #1537. |
Updated PR for #1343. Supercedes #1347 and #1516.