| Module | Engines::RailsExtensions::ActionMailer |
| In: |
lib/engines/rails_extensions/action_mailer.rb
|
The way ActionMailer is coded in terms of finding templates is very restrictive, to the point where all templates for rendering must exist under the single base path. This is difficult to work around without re-coding significant parts of the action mailer code.
The MailTemplates module overrides two (private) methods from ActionMailer to enable mail templates within plugins:
Ideally ActionMailer would use the same template-location logic as ActionView, and the same view paths as ActionController::Base.view_paths, but it currently does not.