From 6841d0cc6d19002f3f85343d582310756aadf2c1 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Fri, 29 Mar 2019 11:04:16 -0700 Subject: Deprecate render layout with an absolute path This has similar problems to render file:. I've never seen this used, and believe it's a relic from when all templates could be rendered from an absolute path. --- actionview/lib/action_view/renderer/template_renderer.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionview/lib/action_view') diff --git a/actionview/lib/action_view/renderer/template_renderer.rb b/actionview/lib/action_view/renderer/template_renderer.rb index 9548fe12c4..e722721229 100644 --- a/actionview/lib/action_view/renderer/template_renderer.rb +++ b/actionview/lib/action_view/renderer/template_renderer.rb @@ -84,6 +84,7 @@ module ActionView when String begin if layout.start_with?("/") + ActiveSupport::Deprecation.warn "Rendering layouts from an absolute path is deprecated." @lookup_context.with_fallbacks.find_template(layout, nil, false, [], details) else @lookup_context.find_template(layout, nil, false, [], details) -- cgit v1.2.3