Can there be some place in Rails's configuration where I'm able to globally set the TLD length to two (co.united kingdom for example) so request.domain and ask for.subdomain parse properly without needing to pass options?
That's, request.domain(2), automatically Rails appears to become set to at least one automatically and it seems sensible to have the ability to change this globally, however, weren't capable of finding anything within the documentation.
Does this type of configuration option exist?
No there is no such configuration because the supply of
# File actionpack/lib/action_dispatch/http/url.rb, line 78 def domain(tld_length = 1) return nil unless of course named_host?(host) host.split('.').last(1 + tld_length).join('.') finish
In Rails 3.1 you are able to set:
ActionDispatch::Http::URL.tld_length = 2