evendis / mandrill-rails

Webhook processing and event decoration to make using Mandrill with Rails just that much easier
MIT License
288 stars 36 forks source link

First draft for engine and activerecord #15

Open jadetr opened 10 years ago

jadetr commented 10 years ago

Hello,

I've forked the repo and added "engine and activerecord" support to easily save results from webhooks into the DB. I'd like to get a feedback on the work done so far.

Is there interest to merge this fork into the master branch? If yes, is there other features that should be added/removed. I'd like to have feedback to fix things before submitting my work.

Regards,

Jade

https://github.com/jadetr/mandrill-rails.git

right now to save webhooks for open and click events, I just have to mount the engine: route.rb mount Mandrill::Engine => "/mandrill", :as => "mandrill"

import and run migration: rake railties:install:migrations rake db:migrate

tardate commented 10 years ago

@jadetr great, thanks for sharing the work! So far I've been using some variations on the same pattern but I hadn't got around to formalising it. I haven't looked at your fork yet, but I'm expecting it to be very similar ... with the exception that I'm using MongoDB in many cases, so to roll this in we'd need to make sure it is flexible enough to allow capabilities to be enabled only as required.

I'll take a look at your fork and make some suggestions OK?

jadetr commented 10 years ago

@tardate absolutely, look at it and give me your suggestions. Do you have a gem to recommends that play nicely with ActiveRecord and MongoDB? I'd like to look at the way they support both backend.