instance method attempt

Ruby on Rails 7.0.10

Since v6.1.7.10

Available in: v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

attempt(env)

No documentation comment.

Parameters

env req
Source
# File actionpack/lib/action_dispatch/middleware/static.rb, line 63
    def attempt(env)
      request = Rack::Request.new env

      if request.get? || request.head?
        if found = find_file(request.path_info, accept_encoding: request.accept_encoding)
          serve request, *found
        end
      end
    end

Defined in actionpack/lib/action_dispatch/middleware/static.rb line 63 · 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