class ActionDispatch::Journey::Router
def find_routes(req)
def find_routes(req) path_info = req.path_info routes = filter_routes(path_info).concat custom_routes.find_all { |r| r.path.match?(path_info) } if req.head? routes = match_head_routes(routes, req) else routes.select! { |r| r.matches?(req) } end routes.sort_by!(&:precedence) routes.each { |r| match_data = r.path.match(path_info) path_parameters = {} match_data.names.each_with_index { |name, i| val = match_data[i + 1] path_parameters[name.to_sym] = Utils.unescape_uri(val) if val } yield [match_data, path_parameters, r] } end