mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Clean up subdomain code a bit.
This commit is contained in:
parent
b039069756
commit
96aa3bd0ea
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue