summaryrefslogtreecommitdiffstats
path: root/app/models/mailer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/mailer.rb')
-rw-r--r--app/models/mailer.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index 9639e1a9c..257f57726 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -150,6 +150,11 @@ class Mailer < ActionMailer::Base
def render_message(method_name, body)
layout = method_name.match(%r{text\.html\.(rhtml|rxml)}) ? 'layout.text.html.rhtml' : 'layout.text.plain.rhtml'
body[:content_for_layout] = render(:file => method_name, :body => body)
- ActionView::Base.new(File.join(template_root, 'mailer'), body, self).render(:file => layout)
+ ActionView::Base.new(template_root, body, self).render(:file => "mailer/#{layout}")
end
+
+ # Makes partial rendering work with Rails 1.2 (retro-compatibility)
+ def self.controller_path
+ ''
+ end unless respond_to?('controller_path')
end