documentcloud/jammit — pull request #224 by blakefrost (2012-03-14 01:11:53+00:00)
Title: Avoid method missing when using include_stylesheets in mailer templates

Using `include_stylesheets` in a mailer view raises an exception because ActionMailer::Base doesn't respond to `params` but `should_package?` expects it to. This adds a check to make sure the class responds to params.

Note: In general, including stylesheets in a mailer view isn't a good idea, but thanks to the roadie gem which automatically inlines styles, this makes more sense.