Search code examples
ruby-on-railssubdomain-fu

subdomain-fu gem tld_size


What does it mean the tld_size in the subdomain-fu gem. for example deafult am having,

  SubdomainFu.tld_sizes = {:development => 1,
   :test => 0,
   :production => 1}

in my initializers/subdomain-fu.rb


Solution

  • I have debugged and found the answer,

    If the config as follows means,

     SubdomainFu.tld_sizes = {:development => 1,
      :test => 0,
      :production => 1}
    

    If your URL is test.lvh.me:3000 means the subdomain-fu gem's current_subdomain will return test. If you set the tld_size is as below,

     SubdomainFu.tld_sizes = {:development => 1,
      :test => 0,
      :production => 0}
    

    Then your URL is test.lvh.me:3000 means the subdomain-fu gem's current_subdomain will return test.lvh

    Thanks...