aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-06-11 14:32:18 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-06-11 14:32:30 -0700
commit3aabac5b0d6ebf3647b6150803219d6acb5c33a6 (patch)
tree455d0134590bc556e28cd1d7197c2518cafc3abc /actionpack
parent1ed2c3cf6a76b0b18d5db36b453324aee175c8c8 (diff)
downloadrails-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')
-rw-r--r--actionpack/lib/action_dispatch/http/url.rb6
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