Created
August 16, 2011 02:30
-
-
Save dirkkelly/1148327 to your computer and use it in GitHub Desktop.
raven
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RavensController < SiteController | |
no_login_required | |
skip_before_filter :verify_authenticity_token | |
def update | |
response = CreateSend::Subscriber.add params[:list], params[:email], params[:name], nil, true | |
respond_to do |format| | |
format.html { render :text => response } | |
end | |
end | |
def destroy | |
@subscriber = CreateSend::Subscriber.new params[:list], params[:email] | |
response = @subscriber.unsubscribe rescue 'not in the list' | |
respond_to do |format| | |
format.html { render :text => response } | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment