Pass in the request as an optional second parameter to redirect

This commit is contained in:
wycats
2010-04-03 21:20:45 -07:00
parent ab8bf9e152
commit a8c3c71af1

View File

@@ -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