Skip to content

Commit 08ef43e

Browse files
authored
Merge pull request rails#46120 from rails/rescue-template-paths
Keep rescue template paths in an array
2 parents 9553814 + 5c6e9d4 commit 08ef43e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

actionpack/lib/action_dispatch/middleware/debug_view.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
module ActionDispatch
99
class DebugView < ActionView::Base # :nodoc:
10-
RESCUES_TEMPLATE_PATH = File.expand_path("templates", __dir__)
10+
RESCUES_TEMPLATE_PATHS = [File.expand_path("templates", __dir__)]
1111

1212
def initialize(assigns)
13-
paths = [RESCUES_TEMPLATE_PATH]
13+
paths = RESCUES_TEMPLATE_PATHS.dup
1414
lookup_context = ActionView::LookupContext.new(paths)
1515
super(lookup_context, assigns, nil)
1616
end

railties/lib/rails/info_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
require "action_dispatch/routing/inspector"
55

66
class Rails::InfoController < Rails::ApplicationController # :nodoc:
7-
prepend_view_path ActionDispatch::DebugView::RESCUES_TEMPLATE_PATH
7+
prepend_view_path ActionDispatch::DebugView::RESCUES_TEMPLATE_PATHS
88
layout -> { request.xhr? ? false : "application" }
99

1010
before_action :require_local!

railties/lib/rails/mailers_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require "rails/application_controller"
44

55
class Rails::MailersController < Rails::ApplicationController # :nodoc:
6-
prepend_view_path ActionDispatch::DebugView::RESCUES_TEMPLATE_PATH
6+
prepend_view_path ActionDispatch::DebugView::RESCUES_TEMPLATE_PATHS
77

88
around_action :set_locale, only: [:preview, :download]
99
before_action :find_preview, only: [:preview, :download]

0 commit comments

Comments
 (0)