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
2 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -243,7 +243,7 @@ def redirect(*args, &block)
lambda do |env|
req =
- uri = URI.parse(
+ uri = URI.parse(, req))
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

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


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
uri.scheme ||= req.scheme ||=
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.