diff options
author | José Valim <jose.valim@gmail.com> | 2011-10-04 11:31:47 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-10-04 11:31:47 +0200 |
commit | 96aa3bd0eae0afa98a1a16d87f5e0b6fa0005dab (patch) | |
tree | 651d5d251e3677ec3198ae76489f067726a23ac6 /actionpack/lib | |
parent | b039069756d7ac6cc9d9096c9e4f98fdcd6a9b33 (diff) | |
download | rails-96aa3bd0eae0afa98a1a16d87f5e0b6fa0005dab.tar.gz rails-96aa3bd0eae0afa98a1a16d87f5e0b6fa0005dab.tar.bz2 rails-96aa3bd0eae0afa98a1a16d87f5e0b6fa0005dab.zip |
Clean up subdomain code a bit.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/http/url.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/http/url.rb b/actionpack/lib/action_dispatch/http/url.rb index 0db404957b..170c68f3e0 100644 --- a/actionpack/lib/action_dispatch/http/url.rb +++ b/actionpack/lib/action_dispatch/http/url.rb @@ -64,7 +64,7 @@ module ActionDispatch end def host_or_subdomain_and_domain(options) - return options[:host] unless options[:subdomain] || options[:subdomain] == false || options[:domain] + return options[:host] if options[:subdomain].nil? && options[:domain].nil? tld_length = options[:tld_length] || @@tld_length @@ -73,7 +73,7 @@ module ActionDispatch host << (options[:subdomain] || extract_subdomain(options[:host], tld_length)) host << "." end - host << (options[:domain] || extract_domain(options[:host], tld_length)) + host << (options[:domain] || extract_domain(options[:host], tld_length)) host end end |