Remove deprecated support to :nothing in render

上级 333bfd89
* 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*
......
......@@ -98,11 +98,6 @@ def _normalize_options(options) #:nodoc:
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
......
......@@ -160,10 +160,6 @@ def conditional_hello_with_cache_control_headers
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 @@ def test_expires_now_with_cache_control_headers
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册