title: How do I get the host and port in a Rails application
body: <p>In a Rails Model, I want to be able to find out the host and port.  For example, if I am in a test environment it would return <code>http://localhost:3000/</code>  and if I was in production it would return something like <code>http://my.application.com/</code>?</p>