1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Delegate subdomain method to the URL module, removing duplication

This commit is contained in:
Carlos Antonio da Silva 2012-01-12 14:47:25 -02:00
parent 47d8fc0840
commit 034bf72719

View file

@ -169,7 +169,7 @@ module ActionDispatch
# such as 2 to catch <tt>"www"</tt> instead of <tt>"www.rubyonrails"</tt>
# in "www.rubyonrails.co.uk".
def subdomain(tld_length = @@tld_length)
subdomains(tld_length).join(".")
ActionDispatch::Http::URL.extract_subdomain(host, tld_length)
end
end
end