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

Deprecate Address#empty? #1686

Merged
merged 4 commits into from
Jan 19, 2017

Conversation

jhawthorn
Copy link
Contributor

@jhawthorn jhawthorn commented Jan 18, 2017

Previous PR #1685 was reverted. It was causing errors due to a deprecation (which wasn't caught due to CircleCI configuration).

In addition to deprecating Address#empty? this changes the "Use billing" checkbox in the admin to be checked any time the two addresses are equal, and the ship_address is a new record. I think this was probably the original intention of checking empty? (only new records can be empty because of Address's validations).

Test changes aren't required, but make more specific assertions about our app's behaviour.

jhawthorn and others added 4 commits January 17, 2017 13:34
Previously this would return Address#empty?, but an Address should
always be considered present.
Previously, this would only check the box if the two addresses were
identical AND they were both "empty".

Instead, this now checks "Use billing" any time the two addresses are
equal and the ship_address is a new record. I think this was probably
the original intention of checking empty? (only new records can be
empty because of Address's validations).
@jhawthorn jhawthorn force-pushed the deprecate_address_empty_take_2 branch from f7d54fa to 57b005a Compare January 18, 2017 00:22
@jhawthorn jhawthorn merged commit 92d2cca into solidusio:master Jan 19, 2017
@jhawthorn jhawthorn deleted the deprecate_address_empty_take_2 branch January 19, 2017 18:16
JuanCrg90 added a commit to JuanCrg90/solidus_taxjar that referenced this pull request Mar 12, 2019
Solidus has deprecated the `empty?` method on
solidusio/solidus#1686 . This adds a private
`empty?` method for avoid future problems and remove the deprecation
warning in projects that uses this gem.
JuanCrg90 added a commit to JuanCrg90/solidus_taxjar that referenced this pull request Mar 12, 2019
Solidus has deprecated the `empty?` method on
solidusio/solidus#1686 . This adds a private
`empty?` method for avoid future problems and remove the deprecation
warning in projects that uses this gem.
JuanCrg90 added a commit to JuanCrg90/solidus_taxjar that referenced this pull request Mar 12, 2019
Solidus has deprecated the `empty?` method on
solidusio/solidus#1686 . This adds a private
`incomplete_address?` method for avoid future problems and remove the
deprecation warning in projects that uses this gem.
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.

2 participants