instance method
url
Ruby on Rails 8.1.2
Since v3.0.20Signature
url()
Returns the complete URL used for this request.
req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' req.url # => "http://example.com"
Source
# File actionpack/lib/action_dispatch/http/url.rb, line 287
def url
protocol + host_with_port + fullpath
end
Defined in actionpack/lib/action_dispatch/http/url.rb line 287
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Http::URL