Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

find_routes only use the request, so stop passing env

  • Loading branch information...
commit 559d89c5b3381f6744b81e45bf423026fcaf4f9d 1 parent 890e0a9
@tenderlove tenderlove authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionpack/lib/action_dispatch/journey/router.rb
View
6 actionpack/lib/action_dispatch/journey/router.rb
@@ -34,7 +34,7 @@ def call(env)
req.path_info = Utils.normalize_path(req.path_info)
- find_routes(env, req).each do |match, parameters, route|
+ find_routes(req).each do |match, parameters, route|
set_params = req.path_parameters
path_info = req.path_info
script_name = req.script_name
@@ -64,7 +64,7 @@ def call(env)
def recognize(req)
rails_req = request_class.new(req.env)
- find_routes(req.env, rails_req).each do |match, parameters, route|
+ find_routes(rails_req).each do |match, parameters, route|
unless route.path.anchored
req.env['SCRIPT_NAME'] = match.to_s
req.env['PATH_INFO'] = match.post_match.sub(/^([^\/])/, '/\1')
@@ -104,7 +104,7 @@ def filter_routes(path)
simulator.memos(path) { [] }
end
- def find_routes env, req
+ def find_routes req
routes = filter_routes(req.path_info).concat custom_routes.find_all { |r|
r.path.match(req.path_info)
}
Please sign in to comment.
Something went wrong with that request. Please try again.