class ActionDispatch::Request

def fullpath

request.fullpath # => "/articles?page=2"
# get "/articles?page=2"

request.fullpath # => "/articles"
# get "/articles"

Returns the +String+ full path including params of the last URL requested.
def fullpath
  @fullpath ||= super
end