aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-01-27 17:15:46 -0800
committerSantiago Pastorino <santiago@wyeworks.com>2012-01-27 17:15:46 -0800
commitfd3211ef677efe9531f38db58919a8c90d65892a (patch)
tree760765ee0f86a7f09b67638ece60c6db45cc9f0f /railties
parentc0dafb615a771ed20922fb7d5c9d48848bbb260c (diff)
parent2d62334ae69b008a0c1972fc057d08f5a0abe659 (diff)
downloadrails-fd3211ef677efe9531f38db58919a8c90d65892a.tar.gz
rails-fd3211ef677efe9531f38db58919a8c90d65892a.tar.bz2
rails-fd3211ef677efe9531f38db58919a8c90d65892a.zip
Merge pull request #4731 from ndbroadbent/revert_build_original_fullpath
Reverted build_original_fullpath method refactor
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/application.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb
index 2778dce331..c163081bfc 100644
--- a/railties/lib/rails/application.rb
+++ b/railties/lib/rails/application.rb
@@ -290,7 +290,15 @@ module Rails
end
def build_original_fullpath(env)
- ["#{env["SCRIPT_NAME"]}#{env["PATH_INFO"]}", env["QUERY_STRING"]].reject(&:blank?).join("?")
+ path_info = env["PATH_INFO"]
+ query_string = env["QUERY_STRING"]
+ script_name = env["SCRIPT_NAME"]
+
+ if query_string.present?
+ "#{script_name}#{path_info}?#{query_string}"
+ else
+ "#{script_name}#{path_info}"
+ end
end
end
end