diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-06-11 14:32:18 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-06-11 14:32:30 -0700 |
commit | 3aabac5b0d6ebf3647b6150803219d6acb5c33a6 (patch) | |
tree | 455d0134590bc556e28cd1d7197c2518cafc3abc /actionpack/lib/action_dispatch/http | |
parent | 1ed2c3cf6a76b0b18d5db36b453324aee175c8c8 (diff) | |
download | rails-3aabac5b0d6ebf3647b6150803219d6acb5c33a6.tar.gz rails-3aabac5b0d6ebf3647b6150803219d6acb5c33a6.tar.bz2 rails-3aabac5b0d6ebf3647b6150803219d6acb5c33a6.zip |
these methods are always called with a tld_parameter
remove the default parameter since the methods are always called with a
parameter
Diffstat (limited to 'actionpack/lib/action_dispatch/http')
-rw-r--r-- | actionpack/lib/action_dispatch/http/url.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/http/url.rb b/actionpack/lib/action_dispatch/http/url.rb index 97cd32a308..0215de5d55 100644 --- a/actionpack/lib/action_dispatch/http/url.rb +++ b/actionpack/lib/action_dispatch/http/url.rb @@ -12,11 +12,11 @@ module ActionDispatch self.tld_length = 1 class << self - def extract_domain(host, tld_length = @@tld_length) + def extract_domain(host, tld_length) host.split('.').last(1 + tld_length).join('.') if named_host?(host) end - def extract_subdomains(host, tld_length = @@tld_length) + def extract_subdomains(host, tld_length) if named_host?(host) parts = host.split('.') parts[0..-(tld_length + 2)] @@ -25,7 +25,7 @@ module ActionDispatch end end - def extract_subdomain(host, tld_length = @@tld_length) + def extract_subdomain(host, tld_length) extract_subdomains(host, tld_length).join('.') end |