aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-03-06 08:22:43 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2014-03-06 08:22:43 -0800
commitb7192143edc8a8988c8ae0bffb13eb038f08ef16 (patch)
treea6ff66ece992d5cb593db84cc16061c492e9ce0c /actionview
parent2e048bc007e9e0d25d2d243fedc1eb4b93a9428e (diff)
parented88a601f7b37de0f89b64249aaeed884faed836 (diff)
downloadrails-b7192143edc8a8988c8ae0bffb13eb038f08ef16.tar.gz
rails-b7192143edc8a8988c8ae0bffb13eb038f08ef16.tar.bz2
rails-b7192143edc8a8988c8ae0bffb13eb038f08ef16.zip
Merge pull request #14285 from sikachu/master-revert-render-body-remove-content-type
Do note remove `Content-Type` when `render :body`
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/helpers/rendering_helper.rb5
-rw-r--r--actionview/lib/action_view/rendering.rb5
2 files changed, 3 insertions, 7 deletions
diff --git a/actionview/lib/action_view/helpers/rendering_helper.rb b/actionview/lib/action_view/helpers/rendering_helper.rb
index 15b88bcda6..ebfc35a4c7 100644
--- a/actionview/lib/action_view/helpers/rendering_helper.rb
+++ b/actionview/lib/action_view/helpers/rendering_helper.rb
@@ -17,8 +17,9 @@ module ActionView
# * <tt>:html</tt> - Renders the html safe string passed in out, otherwise
# performs html escape on the string first. Setting the content type as
# <tt>text/html</tt>.
- # * <tt>:body</tt> - Renders the text passed in, and does not set content
- # type in the response.
+ # * <tt>:body</tt> - Renders the text passed in, and inherits the content
+ # type of <tt>text/html</tt> from <tt>ActionDispatch::Response</tt>
+ # object.
#
# If no options hash is passed or :update specified, the default is to render a partial and use the second parameter
# as the locals hash.
diff --git a/actionview/lib/action_view/rendering.rb b/actionview/lib/action_view/rendering.rb
index f96587c816..017302d40f 100644
--- a/actionview/lib/action_view/rendering.rb
+++ b/actionview/lib/action_view/rendering.rb
@@ -102,11 +102,6 @@ module ActionView
# Assign the rendered format to lookup context.
def _process_format(format, options = {}) #:nodoc:
super
-
- if options[:body]
- self.no_content_type = true
- end
-
lookup_context.formats = [format.to_sym]
lookup_context.rendered_format = lookup_context.formats.first
end