Skip to content

Commit 57e1c99

Browse files
committed
Remove deprecated support to :nothing in render
1 parent 333bfd8 commit 57e1c99

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

Diff for: actionpack/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Remove deprecated support to `:nothing` in `render`.
2+
3+
*Rafael Mendonça França*
4+
15
* Remove deprecated support to `:back` in `redirect_to`.
26

37
*Rafael Mendonça França*

Diff for: actionpack/lib/action_controller/metal/rendering.rb

-5
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,6 @@ def _normalize_options(options) #:nodoc:
9898
options[:html] = ERB::Util.html_escape(options[:html])
9999
end
100100

101-
if options.delete(:nothing)
102-
ActiveSupport::Deprecation.warn("`:nothing` option is deprecated and will be removed in Rails 5.1. Use `head` method to respond with empty response body.")
103-
options[:body] = nil
104-
end
105-
106101
if options[:status]
107102
options[:status] = Rack::Utils.status_code(options[:status])
108103
end

Diff for: actionpack/test/controller/render_test.rb

-10
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,6 @@ def conditional_hello_with_cache_control_headers
160160
render action: "hello_world"
161161
end
162162

163-
def respond_with_empty_body
164-
render nothing: true
165-
end
166-
167163
def conditional_hello_with_bangs
168164
render action: "hello_world"
169165
end
@@ -371,12 +367,6 @@ def test_expires_now_with_cache_control_headers
371367
assert_match(/no-transform/, @response.headers["Cache-Control"])
372368
end
373369

374-
def test_render_nothing_deprecated
375-
assert_deprecated do
376-
get :respond_with_empty_body
377-
end
378-
end
379-
380370
def test_date_header_when_expires_in
381371
time = Time.mktime(2011,10,30)
382372
Time.stub :now, time do

0 commit comments

Comments
 (0)