module ActionDispatch::Http::URL
def domain(tld_length = @@tld_length)
Returns the \domain part of a \host, such as "rubyonrails.org" in "www.rubyonrails.org". You can specify
def domain(tld_length = @@tld_length) ActionDispatch::Http::URL.extract_domain(host, tld_length) end