title: How to get redirect_to to change host when using a path as a string?
body: <p>I'm redirecting in rails using a string like so:</p>
  
  <pre><code>path = "/blerg/blergs/blergs/blergs"
  
  domain = "www.google.com"
  </code></pre>
  
  <p>So in the controller I'm redirect like this:</p>
  
  <pre><code>redirect_to path, :status =&gt; :found, :host =&gt; domain
  </code></pre>
  
  <p>The problem is the domain isn't changing, it's staying the same as the app's domain. How do redirect with the host param while using a string as the path?</p>
  
  <p>The reason I'm doing this to avoid this security bug, the path has some params in it too:
  <a href="http://brakemanscanner.org/docs/warning_types/redirect/" rel="nofollow">http://brakemanscanner.org/docs/warning_types/redirect/</a></p>