aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xactionpack/lib/action_controller/request.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/request.rb b/actionpack/lib/action_controller/request.rb
index 78a57acf6f..baa955cb04 100755
--- a/actionpack/lib/action_controller/request.rb
+++ b/actionpack/lib/action_controller/request.rb
@@ -369,11 +369,9 @@ EOM
# Returns the interpreted \path to requested resource after all the installation
# directory of this application was taken into account.
def path
- path = (uri = request_uri) ? uri.split('?').first.to_s : ''
-
- # Cut off the path to the installation directory if given
- path.sub!(%r/^#{ActionController::Base.relative_url_root}/, '')
- path || ''
+ path = request_uri.to_s[/\A[^\?]*/]
+ path.sub!(/\A#{ActionController::Base.relative_url_root}/, '')
+ path
end
memoize :path