instance method
attempt
Ruby on Rails edge
Since v6.1.7.10Signature
attempt(env)
No documentation comment.
Parameters
-
envreq
Source
# File actionpack/lib/action_dispatch/middleware/static.rb, line 72
def attempt(env)
request_method = env[::Rack::REQUEST_METHOD]
if request_method == "GET" || request_method == "HEAD"
if found = find_file(env[::Rack::PATH_INFO], env)
serve Rack::Request.new(env), *found
end
end
end
Defined in actionpack/lib/action_dispatch/middleware/static.rb line 72
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::FileHandler