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:`.
|
||||
|
||||
*Rafael Mendonça França*
|
||||
|
|
|
@ -92,8 +92,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)
|
||||
raise ArgumentError, "Rendering layouts from an absolute path is not supported."
|
||||
else
|
||||
@lookup_context.find_template(layout, nil, false, [], details)
|
||||
end
|
||||
|
|
|
@ -237,10 +237,9 @@ class LayoutSetInResponseTest < ActionController::TestCase
|
|||
|
||||
def test_absolute_pathed_layout
|
||||
@controller = AbsolutePathLayoutController.new
|
||||
assert_deprecated do
|
||||
assert_raises(ArgumentError) do
|
||||
get :hello
|
||||
end
|
||||
assert_equal "layout_test.erb hello.erb", @response.body.strip
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -55,6 +55,8 @@ Please refer to the [Changelog][action-pack] for detailed changes.
|
|||
|
||||
### Removals
|
||||
|
||||
* Remove deprecated support to passing absolute paths to `render template:`.
|
||||
|
||||
* Remove deprecated support to passing relative paths to `render file:`.
|
||||
|
||||
* Remove support to template handlers that don't accept two arguments.
|
||||
|
|
Loading…
Reference in a new issue