Posted on September 17, 2007 at 5:00 pm
Relative Roots in Rails
One thing I noticed on each and every single PHP application out there is that they all resort in some kind of global variable defined in an include file to determine what is the application’s root. Something like:
$root = ‘http://www.bla.com/my_site’
and then all the links are generated like:
$root.’/something’
That makes all the urls absolute, and pretty much [...]



















