From 388f602ce42048feb4408f5924575a2149a6ed1c Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Wed, 27 Jan 2021 12:00:40 +0900 Subject: [PATCH] Fix deprecation message s/Rails 6.1 will return/Rails 7.0 will return/ `return_only_media_type_on_content_type` will be introduced in Rails 6.2 so the changing of returning Content-Type will happen in a future version of Rails (probably 7.0). --- actionpack/lib/action_dispatch/http/mime_negotiation.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actionpack/lib/action_dispatch/http/mime_negotiation.rb b/actionpack/lib/action_dispatch/http/mime_negotiation.rb index b0ef7042be994..1439cab00bb26 100644 --- a/actionpack/lib/action_dispatch/http/mime_negotiation.rb +++ b/actionpack/lib/action_dispatch/http/mime_negotiation.rb @@ -36,11 +36,11 @@ def content_mime_type def content_type if self.class.return_only_media_type_on_content_type ActiveSupport::Deprecation.warn( - "Rails 6.1 will return Content-Type header without modification." \ + "Rails 7.0 will return Content-Type header without modification." \ " If you want just the MIME type, please use `#media_type` instead." ) - content_mime_type && content_mime_type.to_s + content_mime_type&.to_s else super end