mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove deprecated support to passing absolute paths to render template:
This commit is contained in:
parent
d52d773946
commit
2759addf2c
4 changed files with 8 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
* Remove deprecated support to passing absolute paths to `render template:`.
|
||||||
|
|
||||||
|
*Rafael Mendonça França*
|
||||||
|
|
||||||
* Remove deprecated support to passing relative paths to `render file:`.
|
* Remove deprecated support to passing relative paths to `render file:`.
|
||||||
|
|
||||||
*Rafael Mendonça França*
|
*Rafael Mendonça França*
|
||||||
|
|
|
@ -92,8 +92,7 @@ module ActionView
|
||||||
when String
|
when String
|
||||||
begin
|
begin
|
||||||
if layout.start_with?("/")
|
if layout.start_with?("/")
|
||||||
ActiveSupport::Deprecation.warn "Rendering layouts from an absolute path is deprecated."
|
raise ArgumentError, "Rendering layouts from an absolute path is not supported."
|
||||||
@lookup_context.with_fallbacks.find_template(layout, nil, false, [], details)
|
|
||||||
else
|
else
|
||||||
@lookup_context.find_template(layout, nil, false, [], details)
|
@lookup_context.find_template(layout, nil, false, [], details)
|
||||||
end
|
end
|
||||||
|
|
|
@ -237,10 +237,9 @@ class LayoutSetInResponseTest < ActionController::TestCase
|
||||||
|
|
||||||
def test_absolute_pathed_layout
|
def test_absolute_pathed_layout
|
||||||
@controller = AbsolutePathLayoutController.new
|
@controller = AbsolutePathLayoutController.new
|
||||||
assert_deprecated do
|
assert_raises(ArgumentError) do
|
||||||
get :hello
|
get :hello
|
||||||
end
|
end
|
||||||
assert_equal "layout_test.erb hello.erb", @response.body.strip
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,8 @@ Please refer to the [Changelog][action-pack] for detailed changes.
|
||||||
|
|
||||||
### Removals
|
### Removals
|
||||||
|
|
||||||
|
* Remove deprecated support to passing absolute paths to `render template:`.
|
||||||
|
|
||||||
* Remove deprecated support to passing relative paths to `render file:`.
|
* Remove deprecated support to passing relative paths to `render file:`.
|
||||||
|
|
||||||
* Remove support to template handlers that don't accept two arguments.
|
* Remove support to template handlers that don't accept two arguments.
|
||||||
|
|
Loading…
Reference in a new issue