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:
parent
47d8fc0840
commit
034bf72719
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue