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

Refactor zones #530

Merged
merged 3 commits into from Jan 20, 2016
Merged

Refactor zones #530

merged 3 commits into from Jan 20, 2016

Conversation

mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Nov 23, 2015

Adds a method to find all zones with shared members (which will really help in finding out which tax rates apply for a particular zone, even if those rates' zone encompasses more territory than the zone in question).

This method includes a complex SQL query that Spree::Zone#match also does. Moved to a scope.

Furthermore, improve the documentation so it's somewhat easier to find out what all these things do.

@cbrunsdon
Copy link
Contributor

The first commit here is covered by #529, maybe shoot this PR at that branch instead?

@mamhoff
Copy link
Contributor Author

mamhoff commented Nov 24, 2015

I'd like to, but Github doesn't let me. Would it be an option to create a branch for the VAT refactoring, and I just point all my PRs to that?

@mamhoff
Copy link
Contributor Author

mamhoff commented Nov 24, 2015

Rebased.

@cbrunsdon
Copy link
Contributor

👍, good by me.

mamhoff and others added 3 commits January 13, 2016 14:26
This class method returns all those zones that have at least one member
in common (even via a state that is part of a country).
Both Spree::Zone.match and Spree::Zone.with_shared_members employ almost
the same SQL for doing what they need to do. Moved into a named scope to
reduce understanding effort.

Improve documentation, follow Rubocop recommendations
@mamhoff
Copy link
Contributor Author

mamhoff commented Jan 13, 2016

Sped up Spree::Zone.with_shared_members a little, and rebase on current master.

@jhawthorn
Copy link
Contributor

👍

jhawthorn added a commit that referenced this pull request Jan 20, 2016
@jhawthorn jhawthorn merged commit a05670f into solidusio:master Jan 20, 2016
@mamhoff mamhoff mentioned this pull request Mar 16, 2016
23 tasks
@mamhoff mamhoff deleted the refactor-zones branch May 24, 2016 19:42
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.

3 participants