Files
fizzy/app/controllers/notifications/unsubscribes_controller.rb
T
secretpray 6895135977 Fix deprecation warnings for skip_before_action :verify_authenticity_token
Replace deprecated `skip_before_action :verify_authenticity_token` with
`skip_forgery_protection` to resolve Rails deprecation warnings.

Changes:
- app/controllers/notifications/unsubscribes_controller.rb
- saas/app/controllers/stripe/webhooks_controller.rb
2026-01-12 18:44:35 +02:00

25 lines
526 B
Ruby

class Notifications::UnsubscribesController < ApplicationController
allow_unauthenticated_access
skip_forgery_protection
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