diff options
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/http/url.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/journey/route.rb | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/url.rb b/actionpack/lib/action_dispatch/http/url.rb index ab5399c8ea..e9d4cd6c34 100644 --- a/actionpack/lib/action_dispatch/http/url.rb +++ b/actionpack/lib/action_dispatch/http/url.rb @@ -100,7 +100,7 @@ module ActionDispatch tld_length = options[:tld_length] || @@tld_length host = "" - unless options[:subdomain] == false + unless options[:subdomain] == false || options[:subdomain] == '' host << (options[:subdomain] || extract_subdomain(options[:host], tld_length)).to_param host << "." end diff --git a/actionpack/lib/action_dispatch/journey/route.rb b/actionpack/lib/action_dispatch/journey/route.rb index 6fda085681..50e1853094 100644 --- a/actionpack/lib/action_dispatch/journey/route.rb +++ b/actionpack/lib/action_dispatch/journey/route.rb @@ -102,6 +102,10 @@ module ActionDispatch value === request.send(method).to_s when Array value.include?(request.send(method)) + when TrueClass + request.send(method).present? + when FalseClass + request.send(method).blank? else value === request.send(method) end |