aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal
diff options
context:
space:
mode:
authorMehmet Emin İNAÇ <mehmetemininac@gmail.com>2015-05-28 15:13:32 +0300
committerMehmet Emin İNAÇ <mehmetemininac@gmail.com>2015-05-28 15:13:32 +0300
commit44781b6e9790d90b4f8b9a41d2b2c114b1a582ee (patch)
treeaa55b3f69aee623a1088398f2bbb1f4b191f20a4 /actionpack/lib/action_controller/metal
parent7cc9754209c0ae00d70bdd629fa4a81a1c74cc6f (diff)
downloadrails-44781b6e9790d90b4f8b9a41d2b2c114b1a582ee.tar.gz
rails-44781b6e9790d90b4f8b9a41d2b2c114b1a582ee.tar.bz2
rails-44781b6e9790d90b4f8b9a41d2b2c114b1a582ee.zip
Deprecate `:nothing` option for render method
`head` method works similar to `render` method with `:nothing` option
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r--actionpack/lib/action_controller/metal/rendering.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb
index 2d15c39d88..b9ae8dd5ea 100644
--- a/actionpack/lib/action_controller/metal/rendering.rb
+++ b/actionpack/lib/action_controller/metal/rendering.rb
@@ -79,6 +79,7 @@ module ActionController
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