Skip to content
Browse files

Pass in the request as an optional second parameter to redirect

  • Loading branch information...
1 parent ab8bf9e commit a8c3c71af161e7d4263ad489ca2f6601bc02a9bb @wycats wycats committed Apr 3, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/routing/mapper.rb
View
2 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -243,7 +243,7 @@ def redirect(*args, &block)
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))
@pixeltrix
Ruby on Rails member
pixeltrix added a note Apr 4, 2010

This is breaking test_redirect_proc and test_redirect_modulo in dispatch/routing_test.rb

@jeremy
Ruby on Rails member
jeremy added a note Apr 4, 2010

Reverted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
uri.scheme ||= req.scheme
uri.host ||= req.host
uri.port ||= req.port unless req.port == 80

0 comments on commit a8c3c71

Please sign in to comment.
Something went wrong with that request. Please try again.