summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-04 17:09:25 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-04 17:09:25 +0000
commit260373aed71ede51f4bc46e34283dd66b8be1cd8 (patch)
tree4fd848b5e3e56e2a00b9d29d8d3e087789f0680b /app/models
parent4a5d3e03531f37a46c80a976d5a38189db70a8ff (diff)
downloadredmine-260373aed71ede51f4bc46e34283dd66b8be1cd8.tar.gz
redmine-260373aed71ede51f4bc46e34283dd66b8be1cd8.zip
Slight changes to ease Rails 2.2 support.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2234 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r--app/models/mailer.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index 9a0f3a501..beef97a7b 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -191,7 +191,7 @@ class Mailer < ActionMailer::Base
# URL options
h = Setting.host_name
- h = h.to_s.gsub(%r{\/.*$}, '') unless ActionController::AbstractRequest.relative_url_root.blank?
+ h = h.to_s.gsub(%r{\/.*$}, '') unless Redmine::Utils.relative_url_root.blank?
default_url_options[:host] = h
default_url_options[:protocol] = Setting.protocol
@@ -226,7 +226,7 @@ class Mailer < ActionMailer::Base
# Renders a message with the corresponding layout
def render_message(method_name, body)
- layout = method_name.match(%r{text\.html\.(rhtml|rxml)}) ? 'layout.text.html.rhtml' : 'layout.text.plain.rhtml'
+ layout = method_name.to_s.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(template_root, body, self).render(:file => "mailer/#{layout}", :use_full_path => true)
end