diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-12-05 16:48:19 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-12-05 16:50:42 -0500 |
commit | 9e352e38bdd52a06c06d2de88c155b84b9f18ca1 (patch) | |
tree | 2a5ef924b85f9dc2291a1cf765c4564a914af1c6 /actionpack | |
parent | d7f55e987849c5a17f9d3152abd4fbacac08a509 (diff) | |
download | rails-9e352e38bdd52a06c06d2de88c155b84b9f18ca1.tar.gz rails-9e352e38bdd52a06c06d2de88c155b84b9f18ca1.tar.bz2 rails-9e352e38bdd52a06c06d2de88c155b84b9f18ca1.zip |
Do not try to set the content_type if the format is nil
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/metal/rendering.rb | 2 |
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 e971917ca2..56cfb4fbba 100644 --- a/actionpack/lib/action_controller/metal/rendering.rb +++ b/actionpack/lib/action_controller/metal/rendering.rb @@ -67,7 +67,7 @@ module ActionController end def _set_rendered_content_type(format) - unless response.content_type + if format && !response.content_type self.content_type = format.to_s end end |