mirror of
https://github.com/github/rails.git
synced 2026-01-26 23:08:58 -05:00
Ensure ActionView::PathSet::Path is not initialized with a precompiled path
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user