Skip to content
Browse files

Clean up subdomain code a bit.

  • Loading branch information...
1 parent b039069 commit 96aa3bd0eae0afa98a1a16d87f5e0b6fa0005dab @josevalim josevalim committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_dispatch/http/url.rb
View
4 actionpack/lib/action_dispatch/http/url.rb
@@ -64,7 +64,7 @@ def rewrite_authentication(options)
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 @@ def host_or_subdomain_and_domain(options)
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

0 comments on commit 96aa3bd

Please sign in to comment.
Something went wrong with that request. Please try again.