instance method recognized_request_for

Ruby on Rails 2.3.18

Last seen in v2.3.18 Private — implementation detail, not part of the public API

Available in: v2.2.3 v2.3.18

Signature

recognized_request_for(path, request_method = nil)

Recognizes the route for a given path.

Parameters

path req
request_method opt = nil
Source
# File actionpack/lib/action_controller/assertions/routing_assertions.rb, line 133
        def recognized_request_for(path, request_method = nil)
          path = "/#{path}" unless path.first == '/'

          # Assume given controller
          request = ActionController::TestRequest.new
          request.env["REQUEST_METHOD"] = request_method.to_s.upcase if request_method
          request.path   = path

          ActionController::Routing::Routes.recognize(request)
          request
        end

Defined in actionpack/lib/action_controller/assertions/routing_assertions.rb line 133 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionController::Assertions::RoutingAssertions

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close