Action Mailer Layouts plugin
ruby script/plugin install http://svn.cardboardrocket.com/action_mailer_layouts/
If your mailer class is called UserNotifier and you are rendering the activation.rhtml template, then the plugin will attempt to load the user_notifier.rhtml layout. If you are rendering the activation.text.html.rhtml template, the plugin will look for the user_notifier.text.html.rhtml layout. In other words, the plugin attempts to load the layout named after the your ActionMailer class.
You can overload this behavior by setting the layout property of your mailer:
class UserNotfier < ActionMailer::Base def activation(user) @recipients = user.email @from = 'email@example.com' @sent_on = Time.now @subject = 'Activate your account!' @layout = :email end end
This arrangement will cause the plugin to render the content in views/user_notifier/activation.text.html.rhtml in the views/layouts/email.text.html.rhtml layout.
There is currently no advanced documentation for this plugin.New documentation