My Profile Photo


I'm Jason, a web applications developer in the San Francisco Bay area.

Obtaining Request Domain Name for Ruby on Rails

I’m using Rails 2.3.8. To obtain the domain name for the website being requested (i.e.,, just reference ‘’.

ruby@host =

You can only reference in the views, or the controller.