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

Remove ! from assign_default_user_addresses! #2019

Merged

Conversation

jhawthorn
Copy link
Contributor

There was some confusion when reviewing #1967 about whether assign_default_user_addresses! would persist changes or not. It doesn't, but the ! suggests that it might.

There's no version of this method without an exclamation mark. Additionally, this doesn't have any of the normal tells of a ! method, it doesn't make changes to the database, shouldn't raise exceptions, and
doesn't do anything "dangerous".

This commit renames the method to assign_default_user_addresses, and keeps assign_default_user_addresses! as a deprecated alias. It also adds some YARD docs to the method.

There's no version of this method without an exclamation mark.
Additionally, this doesn't have any of the normal tells of a ! method,
it doesn't make changes to the database, shouldn't raise exceptions, and
doesn't do anything "dangerous".

This commit renames the method to assign_default_user_addresses, and
adds assign_default_user_addresses! as a deprecated alias.
Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mtomov
Copy link
Contributor

mtomov commented Jun 15, 2017

Thanks a lot!

@jhawthorn jhawthorn merged commit 7eb132c into solidusio:master Jun 15, 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