In doing development locally, I usually set my host to localhost
like this:
default_url_options = { :host => 'localhost',
:protocol => 'http',
:port => '3000' }
The problem with this is that sometimes I like to test mobile clients by accessing my local rails server (running on our local network). Because Rails creates urls like http://localhost:3000/assets/blahblah.css
, I am unable to sufficiently test my set up outside of figuring out my local IP address and putting that in for my host value.
Is there a better way to do this where Rails, easily, determines the local IP address from which I can populate my host value?