Allow for configuration of a custom callback host from Rails controller, this means we can decouple the handler methods from the controller.
Usage
class MyCustomCallbackHost
def handle_hard_bounce(payload)
# Do stuff with payload
end
end
module Mandrill
module Webhooks
class InboxController < ApplicationController
include Mandrill::Rails::WebHookProcessor
ignore_unhandled_events!
authenticate_with_mandrill_keys! 'YOUR_MANDRILL_WEBHOOK_KEY'
callback_host(MyCustomCallbackHost.new)
end
end
end
Intention
Allow for configuration of a custom callback host from Rails controller, this means we can decouple the handler methods from the controller.
Usage