Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[ci skip] Add documentation for original_fullpath.

  • Loading branch information...
commit 0d191baa823414a900ef7362359cb6fc87be1d38 1 parent 9f84c7b
@laurocaetano laurocaetano authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 actionpack/lib/action_dispatch/http/request.rb
View
7 actionpack/lib/action_dispatch/http/request.rb
@@ -152,6 +152,13 @@ def headers
Http::Headers.new(@env)
end
+ # Returns a +String+ with the last requested path including their params.
+ #
+ # # get '/foo'
+ # request.original_fullpath # => '/foo'
+ #
+ # # get '/foo?bar'
+ # request.original_fullpath # => '/foo?bar'
def original_fullpath
@original_fullpath ||= (env["ORIGINAL_FULLPATH"] || fullpath)
end
Please sign in to comment.
Something went wrong with that request. Please try again.