aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-06-15 21:22:27 -0500
committerJoshua Peek <josh@joshpeek.com>2008-06-17 21:21:07 -0500
commitbec4b69a3b65c3696edad3c880207e8c476b0937 (patch)
treeef655dd59b5b46eb38f7f868c7e8c182635abe65 /actionmailer
parent6ffe32160e16398d347e6bcd396ad843ba68e52a (diff)
downloadrails-bec4b69a3b65c3696edad3c880207e8c476b0937.tar.gz
rails-bec4b69a3b65c3696edad3c880207e8c476b0937.tar.bz2
rails-bec4b69a3b65c3696edad3c880207e8c476b0937.zip
Replaced TemplateFinder abstraction with ViewLoadPaths
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/lib/action_mailer/base.rb5
-rwxr-xr-xactionmailer/test/mail_service_test.rb6
2 files changed, 5 insertions, 6 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 51fc6032cc..1518e23dfe 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -426,8 +426,7 @@ module ActionMailer #:nodoc:
end
def template_root=(root)
- write_inheritable_attribute(:template_root, root)
- ActionView::TemplateFinder.process_view_paths(root)
+ write_inheritable_attribute(:template_root, ActionView::ViewLoadPaths.new(Array(root)))
end
end
@@ -547,7 +546,7 @@ module ActionMailer #:nodoc:
end
def initialize_template_class(assigns)
- ActionView::Base.new([template_root], assigns, self)
+ ActionView::Base.new(template_root, 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..7f4a8817ca 100755
--- a/actionmailer/test/mail_service_test.rb
+++ b/actionmailer/test/mail_service_test.rb
@@ -942,13 +942,13 @@ end # uses_mocha
class InheritableTemplateRootTest < Test::Unit::TestCase
def test_attr
expected = "#{File.dirname(__FILE__)}/fixtures/path.with.dots"
- assert_equal expected, FunkyPathMailer.template_root
+ assert_equal [expected], FunkyPathMailer.template_root.map(&:to_s)
sub = Class.new(FunkyPathMailer)
sub.template_root = 'test/path'
- assert_equal 'test/path', sub.template_root
- assert_equal expected, FunkyPathMailer.template_root
+ assert_equal ['test/path'], sub.template_root.map(&:to_s)
+ assert_equal [expected], FunkyPathMailer.template_root.map(&:to_s)
end
end