instance method
content_type
Ruby on Rails 6.0.6
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 81
def content_type(path)
::Rack::Mime.mime_type(::File.extname(path), "text/plain")
end
Defined in actionpack/lib/action_dispatch/middleware/static.rb line 81
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::FileHandler