Hi
I am using an ActionMailer in a component but the template has not
been found correctly. Thus, I simply added a
uses_component_template_root function to the ActionMailer::Base class
by the following code and maybe it''s useful to someone ;)
== 8< =================================================
# We have to modifiy the ActionMailer::Base class a bit to add a
# uses_component_template_root function.
module ActionMailer
class Base
def Base::uses_component_template_root
path_of_calling_mailer = File.dirname(caller[0].split(/:\d
+:/).first)
self.template_root = path_of_calling_mailer
end
end
end
== 8< =================================================
I could use /components/[component name]/[mailer name]/[action
name].rhtml for the views.
Regards
Manuel Holtgrewe