diff options
-rw-r--r-- | actionpack/lib/abstract_controller/rendering.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_controller/metal/rendering.rb | 4 | ||||
-rw-r--r-- | actionview/lib/action_view/rendering.rb | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index 887196b3d2..854b07d707 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -23,7 +23,7 @@ module AbstractController def render(*args, &block) options = _normalize_render(*args, &block) self.response_body = render_to_body(options) - _process_format(rendered_format, options) if rendered_format + _process_format(rendered_format, options[:plain]) if rendered_format self.response_body end @@ -99,7 +99,7 @@ module AbstractController # Process the rendered format. # :api: private - def _process_format(format, options = {}) + def _process_format(format, plain = false) end # Normalize args and options. diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb index a3b0645dc0..0a005085ba 100644 --- a/actionpack/lib/action_controller/metal/rendering.rb +++ b/actionpack/lib/action_controller/metal/rendering.rb @@ -56,10 +56,10 @@ module ActionController nil end - def _process_format(format, options = {}) + def _process_format(format, plain = false) super - if options[:plain] + if plain self.content_type = Mime::TEXT else self.content_type ||= format.to_s diff --git a/actionview/lib/action_view/rendering.rb b/actionview/lib/action_view/rendering.rb index 86a80a5421..f63c397c5b 100644 --- a/actionview/lib/action_view/rendering.rb +++ b/actionview/lib/action_view/rendering.rb @@ -104,7 +104,7 @@ module ActionView end # Assign the rendered format to look up context. - def _process_format(format, options = {}) #:nodoc: + def _process_format(format, plain = false) #:nodoc: super lookup_context.formats = [format.to_sym] lookup_context.rendered_format = lookup_context.formats.first |