diff options
-rw-r--r-- | actionpack/lib/action_controller/rescue.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/paths.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_view/template.rb | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/rescue.rb b/actionpack/lib/action_controller/rescue.rb index d7b0e96c93..24ee160ee8 100644 --- a/actionpack/lib/action_controller/rescue.rb +++ b/actionpack/lib/action_controller/rescue.rb @@ -39,7 +39,7 @@ module ActionController #:nodoc: } RESCUES_TEMPLATE_PATH = ActionView::PathSet::Path.new( - "#{File.dirname(__FILE__)}/templates", true) + File.join(File.dirname(__FILE__), "templates"), true) def self.included(base) #:nodoc: base.cattr_accessor :rescue_responses diff --git a/actionpack/lib/action_view/paths.rb b/actionpack/lib/action_view/paths.rb index 9c8b8ade1e..623b9ff6b0 100644 --- a/actionpack/lib/action_view/paths.rb +++ b/actionpack/lib/action_view/paths.rb @@ -57,6 +57,10 @@ module ActionView #:nodoc: end end + def to_str + path.to_str + end + def ==(path) to_str == path.to_str end diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb index e32b7688d0..93748638c3 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -105,7 +105,7 @@ module ActionView #:nodoc: def find_full_path(path, load_paths) load_paths = Array(load_paths) + [nil] load_paths.each do |load_path| - file = [load_path, path].compact.join('/') + file = load_path ? "#{load_path.to_str}/#{path}" : path return load_path, file if File.file?(file) end raise MissingTemplate.new(load_paths, path) |