aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorNathan Broadbent <nathan.f77@gmail.com>2012-01-28 09:12:18 +0800
committerNathan Broadbent <nathan.f77@gmail.com>2012-01-28 09:12:18 +0800
commit2d62334ae69b008a0c1972fc057d08f5a0abe659 (patch)
tree760765ee0f86a7f09b67638ece60c6db45cc9f0f /railties/lib
parentc0dafb615a771ed20922fb7d5c9d48848bbb260c (diff)
downloadrails-2d62334ae69b008a0c1972fc057d08f5a0abe659.tar.gz
rails-2d62334ae69b008a0c1972fc057d08f5a0abe659.tar.bz2
rails-2d62334ae69b008a0c1972fc057d08f5a0abe659.zip
Reverted build_original_fullpath method, as per discussion at https://github.com/rails/rails/pull/4470/files#r393461
Diffstat (limited to 'railties/lib')
-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