Monday, April 23, 2012

How do I get the host and port in a Rails applicaiton

Feel pretty dumb with this question.



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 http://localhost:3000/ and if I was in production it would return something like http://my.application.com/?



Is this even possible?



Thanks!



jt





No comments:

Post a Comment