After a user submits your site's contact form, enquiry will help you run your post-submit actions. These actions will be run as separate processes, by plugging in to a Ruby-based worker library like Sidekiq.
It currently has support for:
- sending notification emails to the site owner
- subscribing the enquiry to a Mailchimp list
- adding the enquiry's details to a Google Sheet
Add this line to your application's Gemfile:
gem 'enquiry'
And then execute:
$ bundle
Or install it yourself as:
$ gem install enquiry
require 'enquiry'
# call class methods directly
Enquiry.add_to_google_sheet(...)
Enquiry.subscribe_to_mailchimp_list(...)
Enquiry.notify_by_email(...)
# or, pass an object that implements
# - to_email
# - to_google_sheet
# - to_mailchimp
# ...and run all available actions
Enquiry.new(enquiry_object).sync