-
Notifications
You must be signed in to change notification settings - Fork 16
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
[CAPT-1862] Add unsubscribe functionality #3445
base: master
Are you sure you want to change the base?
Conversation
resources :unsubscribe, | ||
path: "/unsubscribe/:resource_class", | ||
constraints: {resource_class: /reminders/}, | ||
only: [:create, :show] | ||
|
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.
resource_class
is not currently used. but has been added so can be extended to support unsubscribing of other resource in the future easily if needed
<div class="govuk-grid-column-two-thirds"> | ||
<%= form_with model: @form, | ||
url: unsubscribe_index_path, | ||
scope: "", |
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.
- empty scope is used here so form does not use nested parameters
- this means the structure of the data supports a simpler format allowing the same controller endpoint to support one click unsubscriptions
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 implmenting soft delete - could I ask that you instead re-use the Deletable
concern to avoid duplication
Context
Changes
unsubscribe_url
as part of reminder emails in thepersonalisation
section so they can be appended to emails sent to usersconfig.action_controller.action_on_unpermitted_parameters
has been changed back to the rails default setting which happens to also be the setting used in production. not sure why this was ever changed in the first place as it makes development and test behave differently to how production would behaveNotes
mail-notify
which includes a change to support one click unsubscribe. Please remove last commit if one click unsub is not requiredScreenshots
After user click unsubscribe link in email
Upon successfully unsubscribing
Wrong link or user already unsubscribed