app/controllers/mailkick/subscriptions_controller.rb in mailkick-0.1.2 vs app/controllers/mailkick/subscriptions_controller.rb in mailkick-0.1.3

- old
+ new

@@ -5,16 +5,16 @@ def show end def unsubscribe Mailkick.opt_out(@options) - redirect_to subscription_path(url_token) + redirect_to subscription_path(params[:id]) end def subscribe Mailkick.opt_in(@options) - redirect_to subscription_path(url_token) + redirect_to subscription_path(params[:id]) end protected def set_email @@ -39,21 +39,15 @@ Mailkick.opted_out?(@options) end helper_method :opted_out? def subscribe_url - subscribe_subscription_path(url_token) + subscribe_subscription_path(params[:id]) end helper_method :subscribe_url def unsubscribe_url - unsubscribe_subscription_path(url_token) + unsubscribe_subscription_path(params[:id]) end helper_method :unsubscribe_url - - private - - def url_token - @url_token ||= CGI.escape(params[:id]) - end end end