1
0
Fork 0
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:
José Valim 2011-10-04 11:31:47 +02:00
parent b039069756
commit 96aa3bd0ea

View file

@ -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