instance method
domain
Ruby on Rails 8.1.2
Since v3.0.20Signature
domain(tld_length = @@tld_length)
Returns the domain part of a host, such as “rubyonrails.org” in “www.rubyonrails.org”. You can specify a different tld_length, such as 2 to catch rubyonrails.co.uk in “www.rubyonrails.co.uk”.
Parameters
-
tld_lengthopt = @@tld_length
Source
# File actionpack/lib/action_dispatch/http/url.rb, line 420
def domain(tld_length = @@tld_length)
ActionDispatch::Http::URL.extract_domain(host, tld_length)
end
Defined in actionpack/lib/action_dispatch/http/url.rb line 420
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Http::URL