instance method
content_type
Ruby on Rails 7.0.10
Since v3.0.20 Last seen in v7.0.10Signature
content_type()
No documentation comment.
Source
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 36
def content_type
if self.class.return_only_media_type_on_content_type
ActiveSupport::Deprecation.warn(
"Rails 7.1 will return Content-Type header without modification." \
" If you want just the MIME type, please use `#media_type` instead."
)
content_mime_type&.to_s
else
super
end
end
Defined in actionpack/lib/action_dispatch/http/mime_negotiation.rb line 36
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Http::MimeNegotiation