-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Use paranoia_ prefixed methods #2350
Conversation
c3cda77
to
84ab727
Compare
There was a problem hiding this 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:
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
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 |
84ab727
to
0e360a4
Compare
create(:customer_return_without_return_items, return_items: [return_item], stock_location_id: new_stock_location.id) | ||
end | ||
|
||
|
There was a problem hiding this comment.
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.
0e360a4
to
9cdfa3e
Compare
No description provided.