From a8c3c71af161e7d4263ad489ca2f6601bc02a9bb Mon Sep 17 00:00:00 2001 From: wycats Date: Sat, 3 Apr 2010 21:20:45 -0700 Subject: Pass in the request as an optional second parameter to redirect --- actionpack/lib/action_dispatch/routing/mapper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index ffa178345b..e64f5cddad 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -243,7 +243,7 @@ module ActionDispatch lambda do |env| req = Request.new(env) - uri = URI.parse(path_proc.call(req.symbolized_path_parameters)) + uri = URI.parse(path_proc.call(req.symbolized_path_parameters, req)) uri.scheme ||= req.scheme uri.host ||= req.host uri.port ||= req.port unless req.port == 80 -- cgit v1.2.3