From 3047376870d4a7adc7ff15c3cb4852e073c8f1da Mon Sep 17 00:00:00 2001 From: Prem Sichanugrist Date: Fri, 14 Feb 2014 15:50:08 -0500 Subject: 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. --- actionview/lib/action_view/rendering.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionview/lib/action_view') 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 -- cgit v1.2.3