aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/application.rb
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2013-05-03 16:42:31 +0200
committerPiotr Sarnacki <drogus@gmail.com>2013-05-03 18:15:40 +0200
commit9a4268db99d93190c58bddcb150832727a0d5129 (patch)
treefc45c239e93bbac8396c4566325bd663eb8cc980 /railties/lib/rails/application.rb
parentf1af9f83757278f5f852f9c747dd367f1a591833 (diff)
downloadrails-9a4268db99d93190c58bddcb150832727a0d5129.tar.gz
rails-9a4268db99d93190c58bddcb150832727a0d5129.tar.bz2
rails-9a4268db99d93190c58bddcb150832727a0d5129.zip
Fix generating route from engine to other engine
A regression was introduced in 5b3bb6, generating route from within an engine to an another engine resulted in prefixing a path with the SCRIPT_NAME value. The regression was caused by the fact that SCRIPT_NAME should be appended only if it's the SCRIPT_NAME for the application, not if it's SCRIPT_NAME from the current engine. closes #10409
Diffstat (limited to 'railties/lib/rails/application.rb')
-rw-r--r--railties/lib/rails/application.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb
index 2d5aa9d952..914e4393c4 100644
--- a/railties/lib/rails/application.rb
+++ b/railties/lib/rails/application.rb
@@ -93,6 +93,7 @@ module Rails
# dispatches the request to the underlying middleware stack.
def call(env)
env["ORIGINAL_FULLPATH"] = build_original_fullpath(env)
+ env["ORIGINAL_SCRIPT_NAME"] = env["SCRIPT_NAME"]
super(env)
end