diff options
author | Prem Sichanugrist <s@sikac.hu> | 2014-02-28 19:39:22 -0500 |
---|---|---|
committer | Prem Sichanugrist <s@sikac.hu> | 2014-03-05 10:33:52 -0500 |
commit | ed88a601f7b37de0f89b64249aaeed884faed836 (patch) | |
tree | b1414652556db81876b51138070ba25bd088f07b /actionview/lib/action_view/rendering.rb | |
parent | 058d3c6183ef6e0e878bea37f4fe3f8f0d6758e2 (diff) | |
download | rails-ed88a601f7b37de0f89b64249aaeed884faed836.tar.gz rails-ed88a601f7b37de0f89b64249aaeed884faed836.tar.bz2 rails-ed88a601f7b37de0f89b64249aaeed884faed836.zip |
Do note remove `Content-Type` when `render :body`
`render :body` should just not set the `Content-Type` header. By
removing the header, it breaks the compatibility with other parts.
After this commit, `render :body` will returns `text/html` content type,
sets by default from `ActionDispatch::Response`, and it will preserve
the overridden content type if you override it.
Fixes #14197, #14238
This partially reverts commit 3047376870d4a7adc7ff15c3cb4852e073c8f1da.
Diffstat (limited to 'actionview/lib/action_view/rendering.rb')
-rw-r--r-- | actionview/lib/action_view/rendering.rb | 5 |
1 files changed, 0 insertions, 5 deletions
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 |