diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-07-19 15:27:55 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-07-19 15:27:55 -0500 |
commit | 55bfe6be52da1130abb1c148f10d8e9a11368ffd (patch) | |
tree | 34b0e675b2fb772326f99488435d5bdc48e31c12 | |
parent | 1b4b1aa725a4f44c3473ae99b36d7cededba2bea (diff) | |
download | rails-55bfe6be52da1130abb1c148f10d8e9a11368ffd.tar.gz rails-55bfe6be52da1130abb1c148f10d8e9a11368ffd.tar.bz2 rails-55bfe6be52da1130abb1c148f10d8e9a11368ffd.zip |
Ensure ActionView::PathSet::Path is not initialized with a precompiled path
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 3 | ||||
-rw-r--r-- | actionpack/lib/action_view/paths.rb | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index bf60e2f3d5..a43296461b 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -426,7 +426,8 @@ module ActionMailer #:nodoc: end def template_root=(root) - write_inheritable_attribute(:template_root, ActionView::PathSet::Path.new(root)) + root = ActionView::PathSet::Path.new(root) if root.is_a?(String) + write_inheritable_attribute(:template_root, root) end end diff --git a/actionpack/lib/action_view/paths.rb b/actionpack/lib/action_view/paths.rb index c7a5df762f..78548d4aa2 100644 --- a/actionpack/lib/action_view/paths.rb +++ b/actionpack/lib/action_view/paths.rb @@ -28,6 +28,8 @@ module ActionView #:nodoc: delegate :to_s, :to_str, :inspect, :to => :path def initialize(path) + raise ArgumentError, "path already is a Path class" if path.is_a?(Path) + @path = path.freeze reload! end |