diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-01-12 14:47:25 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-01-12 14:47:25 -0200 |
commit | 034bf727190489a9f4cf3643c39b76709d0e0644 (patch) | |
tree | 69d765502ed792bdf7cf468afa447525d6fbbf35 | |
parent | 47d8fc0840d73ee0a634b3b40157bf78a90a20f2 (diff) | |
download | rails-034bf727190489a9f4cf3643c39b76709d0e0644.tar.gz rails-034bf727190489a9f4cf3643c39b76709d0e0644.tar.bz2 rails-034bf727190489a9f4cf3643c39b76709d0e0644.zip |
Delegate subdomain method to the URL module, removing duplication
-rw-r--r-- | actionpack/lib/action_dispatch/http/url.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/url.rb b/actionpack/lib/action_dispatch/http/url.rb index c5adfcd83a..80ffbe575b 100644 --- a/actionpack/lib/action_dispatch/http/url.rb +++ b/actionpack/lib/action_dispatch/http/url.rb @@ -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 |