instance method content_type

Ruby on Rails 5.2.8.1

Since v4.2.9 Last seen in v6.0.6 Private

Available in: v4.2.9 v5.2.8.1 v6.0.6

Signature

content_type(path)

No documentation comment.

Parameters

path req
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

Type at least 2 characters to search.

↑↓ navigate · open · esc close