Allow unique args to be set at the class level #7

merged 2 commits into from May 14, 2013


None yet
2 participants

I found this to be useful because the app I'm integrating with SendGrid has around seven mailers. To set it up as DRYly as possible, I created one main mailer that the others inherit from. Inside that mailer, I'm able to call sendgrid_category, sendgrid_enable, and now sendgrid_unique_args through a custom method_missing. This way, I can dynamically set my unique_args without having to put sendgrid_unique_args in each mailer method. The existing method-level implementation still plays nicely with the new class method.

I've added tests, and made a change or two to get the existing test suite running and passing. Cheers on the gem! Thanks a lot!

Dan Olson added some commits Jul 13, 2012

@stephenb stephenb merged commit 1384298 into stephenb:master May 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment