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

Use paranoia_ prefixed methods #2350

Merged
merged 2 commits into from
Nov 22, 2017

Conversation

jhawthorn
Copy link
Contributor

No description provided.

@jhawthorn jhawthorn added the WIP label Nov 3, 2017
@jhawthorn jhawthorn force-pushed the use_paranoia_prefixed_methods branch from c3cda77 to 84ab727 Compare November 3, 2017 02:18
Copy link
Contributor

@cbrunsdon cbrunsdon left a comment

Choose a reason for hiding this comment

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

Looks like a good step forward for me 👍 . :mergeitblindly:

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.

I like the explicitness of this, although I think the name of your methods should be paranoid_*. Makes it more readable. Will comment on the paranoia PR as well.

@object.destroy
end

if destroy_result
Copy link
Member

Choose a reason for hiding this comment

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

👍 good catch. Lots of extensions might inherit from this.

@jhawthorn
Copy link
Contributor Author

I like the explicitness of this, although I think the name of your methods should be paranoid_*. Makes it more readable. Will comment on the paranoia PR as well.

I agree it sounds better and I definitely thought about it when changing adding these aliases, but the gem's name is paranoia and all the other methods in the gem are prefixed paranoia_ (paranoia_destroyed?, paranoia_scope, paranoia_column) so I think I will keep with that naming.

@jhawthorn jhawthorn force-pushed the use_paranoia_prefixed_methods branch from 84ab727 to 0e360a4 Compare November 15, 2017 00:10
create(:customer_return_without_return_items, return_items: [return_item], stock_location_id: new_stock_location.id)
end


Choose a reason for hiding this comment

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

Extra blank line detected.

Paranoia 2.4 introduces paranoia_delete and paranoia_destroy, allowing
us to be explicit about where we are performing a soft-delete instead of
a real destroy.
@jhawthorn jhawthorn force-pushed the use_paranoia_prefixed_methods branch from 0e360a4 to 9cdfa3e Compare November 15, 2017 00:14
@jhawthorn jhawthorn changed the title [WIP] Use paranoia_ prefixed methods Use paranoia_ prefixed methods Nov 22, 2017
@jhawthorn jhawthorn removed the WIP label Nov 22, 2017
@jhawthorn jhawthorn merged commit f001c80 into solidusio:master Nov 22, 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