diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2013-10-10 13:01:03 +0100 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2013-10-10 13:03:26 +0100 |
commit | 9dbd208562ccd3d68009a72d37cbfe29b94f98c4 (patch) | |
tree | e30ecc10b5ada449c0d54a11b9586cbbb019bdff /actionpack/lib/action_dispatch/testing | |
parent | 0061c5e1ef0f7be8946602456a538c263fcafed2 (diff) | |
download | rails-9dbd208562ccd3d68009a72d37cbfe29b94f98c4.tar.gz rails-9dbd208562ccd3d68009a72d37cbfe29b94f98c4.tar.bz2 rails-9dbd208562ccd3d68009a72d37cbfe29b94f98c4.zip |
Respect `SCRIPT_NAME` when using `redirect` with a relative path
Example:
# application routes.rb
mount BlogEngine => '/blog'
# engine routes.rb
get '/admin' => redirect('admin/dashboard')
This now redirects to the path `/blog/admin/dashboard`, whereas before it
would've generated an invalid url because there would be no slash between
the host name and the path. It also allows redirects to work where the
application is deployed to a subdirectory of a website.
Fixes #7977
Diffstat (limited to 'actionpack/lib/action_dispatch/testing')
0 files changed, 0 insertions, 0 deletions