From 9a4268db99d93190c58bddcb150832727a0d5129 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Fri, 3 May 2013 16:42:31 +0200 Subject: 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 --- railties/lib/rails/application.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'railties/lib/rails/application.rb') 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 -- cgit v1.2.3