diff options
author | Prem Sichanugrist <s@sikac.hu> | 2014-02-14 15:50:08 -0500 |
---|---|---|
committer | Prem Sichanugrist <s@sikac.hu> | 2014-02-18 12:11:41 -0500 |
commit | 3047376870d4a7adc7ff15c3cb4852e073c8f1da (patch) | |
tree | acc61fe46d2367aae107de08efe04a39beec1f12 /actionview/lib | |
parent | 9fe506e3944652c3681ca27d1c2a3a559f605359 (diff) | |
download | rails-3047376870d4a7adc7ff15c3cb4852e073c8f1da.tar.gz rails-3047376870d4a7adc7ff15c3cb4852e073c8f1da.tar.bz2 rails-3047376870d4a7adc7ff15c3cb4852e073c8f1da.zip |
Add `#no_content_type` attribute to `AD::Response`
Setting this attribute to `true` will remove the content type header
from the request. This is use in `render :body` feature.
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/rendering.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionview/lib/action_view/rendering.rb b/actionview/lib/action_view/rendering.rb index 017302d40f..f96587c816 100644 --- a/actionview/lib/action_view/rendering.rb +++ b/actionview/lib/action_view/rendering.rb @@ -102,6 +102,11 @@ 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 |