title: How to get the subdomain value from a url?
body: <p>how can I get the subdomain value in rails, is there a built-in way to do this?</p>
  
  <p>e.g.</p>
  
  <pre><code>test123.example.com
  </code></pre>
  
  <p>I want the test123 part of the url.</p>