instance method
content_type
Ruby on Rails 5.1.7
Since v4.2.11.3 Last seen in v6.0.6.1 Private — implementation detail, not part of the public APISignature
content_type(path)
No documentation comment.
Parameters
-
pathreq
Source
# File actionpack/lib/action_dispatch/middleware/static.rb, line 80
def content_type(path)
::Rack::Mime.mime_type(::File.extname(path), "text/plain".freeze)
end
Defined in actionpack/lib/action_dispatch/middleware/static.rb line 80
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::FileHandler