instance method
content_type
Ruby on Rails 5.2.8.1
Since v4.2.9 Last seen in v6.0.6 PrivateSignature
content_type(path)
No documentation comment.
Parameters
-
pathreq
Source
# File actionpack/lib/action_dispatch/middleware/static.rb, line 82
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 82
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::FileHandler