diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-07-19 12:35:42 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-07-19 12:35:42 -0500 |
commit | e23156e87bd32206a5ea529fbecc04fdf37d7bc2 (patch) | |
tree | 5d6bcfdd991eb5e98e89f29e0f9637c86652903d /actionmailer | |
parent | 746122735269b9077c7d5d99d88e8b22d88ad8d5 (diff) | |
download | rails-e23156e87bd32206a5ea529fbecc04fdf37d7bc2.tar.gz rails-e23156e87bd32206a5ea529fbecc04fdf37d7bc2.tar.bz2 rails-e23156e87bd32206a5ea529fbecc04fdf37d7bc2.zip |
Only create a path for ActionMailer template root instead of a path set. Better fix than 7461227
Diffstat (limited to 'actionmailer')
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 4 | ||||
-rwxr-xr-x | actionmailer/test/mail_service_test.rb | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index e4920f0c86..bf60e2f3d5 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -426,7 +426,7 @@ module ActionMailer #:nodoc: end def template_root=(root) - write_inheritable_attribute(:template_root, ActionView::PathSet.new(Array(root))) + write_inheritable_attribute(:template_root, ActionView::PathSet::Path.new(root)) end end @@ -541,7 +541,7 @@ module ActionMailer #:nodoc: end def template_path - "#{template_root.join}/#{mailer_name}" + "#{template_root}/#{mailer_name}" end def initialize_template_class(assigns) diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index 7f4a8817ca..e5ecb0e254 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.map(&:to_s) + assert_equal expected, FunkyPathMailer.template_root sub = Class.new(FunkyPathMailer) sub.template_root = 'test/path' - assert_equal ['test/path'], sub.template_root.map(&:to_s) - assert_equal [expected], FunkyPathMailer.template_root.map(&:to_s) + assert_equal 'test/path', sub.template_root + assert_equal expected, FunkyPathMailer.template_root end end |