instance method route_uri_pattern

Ruby on Rails 7.2.3

Since v7.1.6

Available in: v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

route_uri_pattern()

Returns the URI pattern of the matched route for the request, using the same format as bin/rails routes:

request.route_uri_pattern # => "/:controller(/:action(/:id))(.:format)"
Source
# File actionpack/lib/action_dispatch/http/request.rb, line 153
    def route_uri_pattern
      get_header("action_dispatch.route_uri_pattern")
    end

Defined in actionpack/lib/action_dispatch/http/request.rb line 153 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionDispatch::Request

Type at least 2 characters to search.

↑↓ navigate · open · esc close