Sorry It seems that the question is somehow a duplicate... can't generate delete link in rails mailing view
The reason is not working, i think, is because the :method => :delete is handled with javascript, and since the link is clicked from the email, javascript is not triggered. The way I would have try to solve this is by passing a parameter to the url like "delete=true" and handle it with that in the controller.
So what I did is created a new route
resources subscribers do
member do
get :unsubscribe
end
end
in the mailer view i used
link_to 'this link', controller: "subscribers", action: "unsubscribe", id: @subscription, token: @subscription.token, only_path: false
I'll just use paranoid to mark the subscription deleted. That would be the difference between the destroy and unsubscribe action..
UPDATE
Also another pattern which is widely used, is that the link from the email redirects to a form (with put, post or delete request) to your application. And it is what i finally did.
Thank you!