Next dump
This commit is contained in:
parent
ef378a1f59
commit
f0e1a2890e
12 changed files with 91 additions and 1 deletions
15
app/controllers/unsubscribes_controller.rb
Normal file
15
app/controllers/unsubscribes_controller.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
class UnsubscribesController < ApplicationController
|
||||
allow_unauthenticated_access
|
||||
before_action :set_subscriber
|
||||
|
||||
def show
|
||||
@subscriber.destroy
|
||||
redirect_to root_path, notice: "Unsubscribed successfully."
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_subscriber
|
||||
@subscriber = Subscriber.find_by_token_for(:unsubscribe, params[:token])
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue