diff options
author | wycats <wycats@gmail.com> | 2010-04-03 21:20:45 -0700 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-04-03 21:20:45 -0700 |
commit | a8c3c71af161e7d4263ad489ca2f6601bc02a9bb (patch) | |
tree | b273dba556604cb56ac49b2c0e0103040d2877ef | |
parent | ab8bf9e152ad75c8b358c85e4c95cfde578de127 (diff) | |
download | rails-a8c3c71af161e7d4263ad489ca2f6601bc02a9bb.tar.gz rails-a8c3c71af161e7d4263ad489ca2f6601bc02a9bb.tar.bz2 rails-a8c3c71af161e7d4263ad489ca2f6601bc02a9bb.zip |
Pass in the request as an optional second parameter to redirect
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |