From 57e1c99a280bdc1b324936a690350320a1cd8111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Sat, 21 May 2016 09:25:28 -0300 Subject: Remove deprecated support to :nothing in render --- actionpack/CHANGELOG.md | 4 ++++ actionpack/lib/action_controller/metal/rendering.rb | 5 ----- actionpack/test/controller/render_test.rb | 10 ---------- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index 76f802d328..f5cc0476b7 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,3 +1,7 @@ +* Remove deprecated support to `:nothing` in `render`. + + *Rafael Mendonça França* + * Remove deprecated support to `:back` in `redirect_to`. *Rafael Mendonça França* diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb index f8f91ed41c..e068f60b1e 100644 --- a/actionpack/lib/action_controller/metal/rendering.rb +++ b/actionpack/lib/action_controller/metal/rendering.rb @@ -98,11 +98,6 @@ module ActionController options[:html] = ERB::Util.html_escape(options[:html]) end - if options.delete(:nothing) - ActiveSupport::Deprecation.warn("`:nothing` option is deprecated and will be removed in Rails 5.1. Use `head` method to respond with empty response body.") - options[:body] = nil - end - if options[:status] options[:status] = Rack::Utils.status_code(options[:status]) end diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index cc4fe5c6b4..76139d59e2 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -160,10 +160,6 @@ class TestController < ActionController::Base render action: "hello_world" end - def respond_with_empty_body - render nothing: true - end - def conditional_hello_with_bangs render action: "hello_world" end @@ -371,12 +367,6 @@ class ExpiresInRenderTest < ActionController::TestCase assert_match(/no-transform/, @response.headers["Cache-Control"]) end - def test_render_nothing_deprecated - assert_deprecated do - get :respond_with_empty_body - end - end - def test_date_header_when_expires_in time = Time.mktime(2011,10,30) Time.stub :now, time do -- cgit v1.2.3