aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorAngelo capilleri <capilleri@yahoo.com>2013-11-29 12:26:12 +0100
committerAngelo Capilleri <capilleri@yahoo.com>2013-12-03 07:46:39 +0100
commit43962d6ec50f918c9970bd3cd4b6ee5c7f7426ed (patch)
treedd773bd243dc9542b2042c0122beb4bc83cfaef5 /actionpack/lib
parent6eba8d27e6feecca88303df6500ef6b376344e29 (diff)
downloadrails-43962d6ec50f918c9970bd3cd4b6ee5c7f7426ed.tar.gz
rails-43962d6ec50f918c9970bd3cd4b6ee5c7f7426ed.tar.bz2
rails-43962d6ec50f918c9970bd3cd4b6ee5c7f7426ed.zip
Fix header Content-Type: #<Mime::NullType:...> 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.
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/metal/rendering.rb2
1 files changed, 1 insertions, 1 deletions
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.