diff options
author | Carl Lerche <carllerche@mac.com> | 2010-03-03 00:31:55 -0800 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-03-03 21:24:00 -0800 |
commit | fb14b8c6fddae818b2688ac1e584534390c37f72 (patch) | |
tree | 442f5876fe272c724ba8b066f91cd37d2a64ca2d /actionpack/lib/action_dispatch/http | |
parent | eb49bd694997954783632eada901553f041c9507 (diff) | |
download | rails-fb14b8c6fddae818b2688ac1e584534390c37f72.tar.gz rails-fb14b8c6fddae818b2688ac1e584534390c37f72.tar.bz2 rails-fb14b8c6fddae818b2688ac1e584534390c37f72.zip |
ActionDispatch::Request deprecates #request_uri
* Refactored ActionPatch to use fullpath instead
Diffstat (limited to 'actionpack/lib/action_dispatch/http')
-rw-r--r-- | actionpack/lib/action_dispatch/http/url.rb | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/actionpack/lib/action_dispatch/http/url.rb b/actionpack/lib/action_dispatch/http/url.rb index 049e1758fe..f7afbe7fed 100644 --- a/actionpack/lib/action_dispatch/http/url.rb +++ b/actionpack/lib/action_dispatch/http/url.rb @@ -3,7 +3,7 @@ module ActionDispatch module URL # Returns the complete URL used for this request. def url - protocol + host_with_port + request_uri + protocol + host_with_port + fullpath end # Returns 'https://' if this is an SSL request and 'http://' otherwise. @@ -88,15 +88,8 @@ module ActionDispatch # Returns the request URI, accounting for server idiosyncrasies. # WEBrick includes the full URL. IIS leaves REQUEST_URI blank. def request_uri - uri = "#{@env["SCRIPT_NAME"]}#{@env["PATH_INFO"]}" - uri << "?#{@env["QUERY_STRING"]}" if @env["QUERY_STRING"].present? - uri - end - - # Returns the interpreted \path to requested resource after all the installation - # directory of this application was taken into account. - def path - @env['PATH_INFO'] + ActiveSupport::Deprecation.warn "Using #request_uri is deprecated. Use fullpath instead." + fullpath end private |