Just spent a chunk of time hunting this down. I don’t see any open
issues against this (I only see one open issue?).
Anyhow, it seems that engines munge the base_path of ActionView::Base in
such a way that the ActionMailer cannot find it’s templates. It’s doing
a FileTest.exist?(path) on a path of ‘{a,b,c}/template.rhml’ and is
failing. I had to toss the following in the mix to get things working:
Fix for engines and ActionMailer
module ActionView
class Base
private
def template_exists?(template_path, extension)
file_path = full_template_path(template_path, extension)
@@method_names.has_key?(file_path) ||
!Dir.glob(file_path).empty?
end
def read_template_file(template_path, extension)
File.read(Dir.glob(template_path).first)
end
end
end
Not sure if I’m doing something else wrong to cause these to be needed.
Looking through the engines code, this stuff doesn’t seem to be covered.
Incidentally, I tried adding these to the
rails_extensions/templates.rb file, but they don’t seem to get pulled in
properly.
–Ian