class method self.host_or_subdomain_and_domain

Ruby on Rails 3.1.12

Since v3.1.12 Last seen in v3.2.22.5 Private

Available in: v3.1.12 v3.2.22.5

Signature

self.host_or_subdomain_and_domain(options)

No documentation comment.

Parameters

options req
Source
# File actionpack/lib/action_dispatch/http/url.rb, line 66
        def host_or_subdomain_and_domain(options)
          return options[:host] if !named_host?(options[:host]) || (options[:subdomain].nil? && options[:domain].nil?)

          tld_length = options[:tld_length] || @@tld_length

          host = ""
          unless options[:subdomain] == false
            host << (options[:subdomain] || extract_subdomain(options[:host], tld_length)).to_param
            host << "."
          end
          host << (options[:domain] || extract_domain(options[:host], tld_length))
          host
        end

Defined in actionpack/lib/action_dispatch/http/url.rb line 66 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionDispatch::Http::URL

Type at least 2 characters to search.

↑↓ navigate · open · esc close