diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-12-10 17:58:07 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-12-10 17:58:07 +0000 |
commit | 6d9490ddcc9c501d31a8b403146cd4ba6d8cc5b5 (patch) | |
tree | ad4a6a8cbc3ec2dadf61886a67c19ffc66ec6710 /app/models/mailer.rb | |
parent | f58db70bdecdbfd0a0d81c0c452d58b88391f9f1 (diff) | |
download | redmine-6d9490ddcc9c501d31a8b403146cd4ba6d8cc5b5.tar.gz redmine-6d9490ddcc9c501d31a8b403146cd4ba6d8cc5b5.zip |
Merged Rails 2.0 compatibility changes.
Compatibility with Rails 1.2 is preserved.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@975 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/mailer.rb')
-rw-r--r-- | app/models/mailer.rb | 7 |
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 |