98755844a1
* Bind sessions to identities * Remove references to the identity token * Move email changes to identity * Move account menu into a turbo-frame * Create tenants from a tenanted route
26 lines
576 B
Ruby
26 lines
576 B
Ruby
class Notifications::UnsubscribesController < ApplicationController
|
|
allow_unauthenticated_access
|
|
allow_unauthorized_access
|
|
skip_before_action :verify_authenticity_token
|
|
|
|
before_action :set_user
|
|
|
|
def new
|
|
end
|
|
|
|
def create
|
|
@user.settings.bundle_email_never!
|
|
redirect_to notifications_unsubscribe_path(access_token: params[:access_token])
|
|
end
|
|
|
|
def show
|
|
end
|
|
|
|
private
|
|
def set_user
|
|
unless @user = User.find_by_token_for(:unsubscribe, params[:access_token])
|
|
redirect_to root_path, alert: "Invalid unsubscribe link"
|
|
end
|
|
end
|
|
end
|