Skip to content
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

Closed

Conversation

Matt-Yorkley
Copy link
Contributor

@Matt-Yorkley Matt-Yorkley commented Apr 5, 2017

Updated PR for #1343. Supercedes #1347 and #1516.

Copy link
Member

@mkllnk mkllnk left a 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
Copy link
Member

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.


def ensure_shop_ready
# Don't display order cycles if shop is not ready for checkout
@order_cycles = {} unless @distributor.ready_for_checkout?
Copy link
Member

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?

@mkllnk
Copy link
Member

mkllnk commented Apr 12, 2017

My suggested changes are in Matt-Yorkley#6. Hope to merge this next week.

@mkllnk mkllnk mentioned this pull request Apr 19, 2017
@mkllnk
Copy link
Member

mkllnk commented Apr 19, 2017

Merged in #1537.

@mkllnk mkllnk closed this Apr 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants