diff options
| author | Joel Hawksley <joelhawksley@github.com> | 2019-06-03 08:27:09 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-03 08:27:09 -0600 |
| commit | 60af9db3745f994e8a4bd7afe9dfa6ea8be7bb7c (patch) | |
| tree | 99c9199bf71835f18e2c746b04abe70569e5baed /actionpack/lib/action_controller/metal | |
| parent | a85c372798723b900762c27e62c35689905327aa (diff) | |
| parent | c926ca46280aee795b98206dd0707a96b9423cc5 (diff) | |
| download | rails-60af9db3745f994e8a4bd7afe9dfa6ea8be7bb7c.tar.gz rails-60af9db3745f994e8a4bd7afe9dfa6ea8be7bb7c.tar.bz2 rails-60af9db3745f994e8a4bd7afe9dfa6ea8be7bb7c.zip | |
Merge pull request #2 from rails/master
merge master
Diffstat (limited to 'actionpack/lib/action_controller/metal')
| -rw-r--r-- | actionpack/lib/action_controller/metal/mime_responds.rb | 2 | ||||
| -rw-r--r-- | actionpack/lib/action_controller/metal/renderers.rb | 2 | ||||
| -rw-r--r-- | actionpack/lib/action_controller/metal/rendering.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/metal/mime_responds.rb b/actionpack/lib/action_controller/metal/mime_responds.rb index bf5e7a433f..5c6f7fe396 100644 --- a/actionpack/lib/action_controller/metal/mime_responds.rb +++ b/actionpack/lib/action_controller/metal/mime_responds.rb @@ -205,7 +205,7 @@ module ActionController #:nodoc: yield collector if block_given? if format = collector.negotiate_format(request) - if content_type && content_type != format + if media_type && media_type != format raise ActionController::RespondToMismatchError end _process_format(format) diff --git a/actionpack/lib/action_controller/metal/renderers.rb b/actionpack/lib/action_controller/metal/renderers.rb index b81d3ef539..a251c29d23 100644 --- a/actionpack/lib/action_controller/metal/renderers.rb +++ b/actionpack/lib/action_controller/metal/renderers.rb @@ -157,7 +157,7 @@ module ActionController json = json.to_json(options) unless json.kind_of?(String) if options[:callback].present? - if content_type.nil? || content_type == Mime[:json] + if media_type.nil? || media_type == Mime[:json] self.content_type = Mime[:js] end diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb index 7d0a944381..7f7c736965 100644 --- a/actionpack/lib/action_controller/metal/rendering.rb +++ b/actionpack/lib/action_controller/metal/rendering.rb @@ -73,7 +73,7 @@ module ActionController end def _set_rendered_content_type(format) - if format && !response.content_type + if format && !response.media_type self.content_type = format.to_s end end |
