From 43962d6ec50f918c9970bd3cd4b6ee5c7f7426ed Mon Sep 17 00:00:00 2001 From: Angelo capilleri Date: Fri, 29 Nov 2013 12:26:12 +0100 Subject: Fix header Content-Type: # in localized template This PR fixes #13064 regression bug introduced by the #8085 Now in _process_format when the format is a Mime::NullType nothing is written in self.content_type. In this way the method Response#assign_default_content_type_and_charset can write the the default mime_type. --- actionpack/lib/action_controller/metal/rendering.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller') diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb index 5c48b4ab98..cb2965abac 100644 --- a/actionpack/lib/action_controller/metal/rendering.rb +++ b/actionpack/lib/action_controller/metal/rendering.rb @@ -34,7 +34,7 @@ module ActionController def _process_format(format) super - self.content_type ||= format.to_s + self.content_type ||= format.to_s unless format.nil? #here test if format is Mime::NullTye istance, no if is a NillClass or FalseClass end # Normalize arguments by catching blocks and setting them on :update. -- cgit v1.2.3