-
Notifications
You must be signed in to change notification settings - Fork 543
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
AO3-6711 Add a "Delete All Subscriptions" option to the Subscriptions page #5096
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks for this! I had two quick notes, but please feel free to wait to action them until someone has done a more thorough review!
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.
My apologies, these were meant to be all review comments, not single comments.
This looks really good, thank you! I just had some small notes for the tests and one discrepancy in the text compared to the Jira issues.
|
||
success = true | ||
@subscriptions.each do |subscription| | ||
subscription.destroy |
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.
subscription.destroy | |
subscription.destroy! |
The other one won't throw if there is an issue, it'll just return false.
Thanks for the feedback! I've updated the code to pluralize and downcase the Side note: I think there may be bugs in the error handling of the clear history feature, as |
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 good, thanks!
Side note: I think there may be bugs in the error handling of the clear history feature, as @errors doesn't seem to exist, and (assuming destroy works the same as subscriptions) it will never throw anyways (readings_controller).
Thanks for pointing this out, I've raised this for discussion internally.
Update: https://otwarchive.atlassian.net/browse/AO3-6953 created
Pull Request Checklist
as the first thing in your pull request title (e.g.
AO3-1234 Fix thing
)until they are reviewed and merged before creating new pull requests.
Issue
https://otwarchive.atlassian.net/browse/AO3-6711
Purpose
Credit
marcus8448 (he/him)