aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/url_helper.rb
diff options
context:
space:
mode:
authorCarlhuda <carlhuda@engineyard.com>2010-03-02 18:57:02 -0800
committerCarl Lerche <carllerche@mac.com>2010-03-03 21:23:34 -0800
commit5e0a05b8cb236d285ebb45de006dd3600c69357d (patch)
tree8fd61eaaa83407c6880bd94c9c3d662cf5c28a84 /actionpack/lib/action_view/helpers/url_helper.rb
parentbcfb77782b9d7f28f0c19005da909162e5e27690 (diff)
downloadrails-5e0a05b8cb236d285ebb45de006dd3600c69357d.tar.gz
rails-5e0a05b8cb236d285ebb45de006dd3600c69357d.tar.bz2
rails-5e0a05b8cb236d285ebb45de006dd3600c69357d.zip
Tweak the semantic of various URL related methods of ActionDispatch::Request
Diffstat (limited to 'actionpack/lib/action_view/helpers/url_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb
index d9607c0095..148f2868e9 100644
--- a/actionpack/lib/action_view/helpers/url_helper.rb
+++ b/actionpack/lib/action_view/helpers/url_helper.rb
@@ -544,10 +544,11 @@ module ActionView
# submitted url doesn't have any either. This lets the function
# work with things like ?order=asc
if url_string.index("?")
- request_uri = request.request_uri
+ request_uri = request.fullpath
else
- request_uri = request.request_uri.split('?').first
+ request_uri = request.path
end
+
if url_string =~ /^\w+:\/\//
url_string == "#{request.protocol}#{request.host_with_port}#{request_uri}"
else