Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gibbon Signup
# app/controllers/rsvp_sxsw_controller.rb
class RsvpSxswController < ApplicationController
MAILCHIMP_API_KEY = "XXXX"
MAILCHIMP_LIST_ID = "XXXX"
# GET /rsvp_sxsw
def new
end
# POST /rsvp_sxsw
def create
Gibbon::Request
.new(api_key: MAILCHIMP_API_KEY)
.lists(MAILCHIMP_LIST_ID)
.members
.create(body: {
email_address: params[:email],
status: 'subscribed',
merge_fields: { FNAME: params[:first_name], LNAME: params[:last_name] },
double_optin: false
})
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.