method
format_from_path_extension
v7.2.3 -
Show latest stable
- Class:
ActionDispatch::Http::MimeNegotiation
format_from_path_extension()private
No documentation available.
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 184
def format_from_path_extension
path = get_header("action_dispatch.original_path") || get_header("PATH_INFO")
if match = path && path.match(/\.(\w+)\z/)
Mime[match.captures.first]
end
end