aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer')
-rw-r--r--[-rwxr-xr-x]actionmailer/README0
-rw-r--r--[-rwxr-xr-x]actionmailer/Rakefile0
-rw-r--r--[-rwxr-xr-x]actionmailer/lib/action_mailer.rb0
-rw-r--r--actionmailer/lib/action_mailer/base.rb19
-rw-r--r--[-rwxr-xr-x]actionmailer/test/mail_service_test.rb0
5 files changed, 15 insertions, 4 deletions
diff --git a/actionmailer/README b/actionmailer/README
index 0e16ea6ec6..0e16ea6ec6 100755..100644
--- a/actionmailer/README
+++ b/actionmailer/README
diff --git a/actionmailer/Rakefile b/actionmailer/Rakefile
index 612bd27774..612bd27774 100755..100644
--- a/actionmailer/Rakefile
+++ b/actionmailer/Rakefile
diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb
index 2e324d4637..2e324d4637 100755..100644
--- a/actionmailer/lib/action_mailer.rb
+++ b/actionmailer/lib/action_mailer.rb
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index a43296461b..fa29ae2446 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -250,7 +250,7 @@ module ActionMailer #:nodoc:
private_class_method :new #:nodoc:
- class_inheritable_accessor :template_root
+ class_inheritable_accessor :view_paths
cattr_accessor :logger
cattr_accessor :template_extensions
@@ -425,9 +425,12 @@ module ActionMailer #:nodoc:
template_extensions << extension
end
+ def template_root
+ self.view_paths && self.view_paths.first
+ end
+
def template_root=(root)
- root = ActionView::PathSet::Path.new(root) if root.is_a?(String)
- write_inheritable_attribute(:template_root, root)
+ self.view_paths = ActionView::Base.process_view_paths(root)
end
end
@@ -541,12 +544,20 @@ module ActionMailer #:nodoc:
initialize_template_class(body).render(opts)
end
+ def template_root
+ self.class.template_root
+ end
+
+ def template_root=(root)
+ self.class.template_root = root
+ end
+
def template_path
"#{template_root}/#{mailer_name}"
end
def initialize_template_class(assigns)
- ActionView::Base.new(template_root, assigns, self)
+ ActionView::Base.new(view_paths, assigns, self)
end
def sort_parts(parts, order = [])
diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb
index e5ecb0e254..e5ecb0e254 100755..100644
--- a/actionmailer/test/mail_service_test.rb
+++ b/actionmailer/test/mail_service_test.rb