Helper for root paths

i’m not sure what to do when my production environment is not in the
root path of the domain when it comes to including things like flash
files.

when testing, everything works great, but since i don’t have a helper
like image_tag, i have to change the url of the flash file each time i
test and then change it back when i deploy the changes.

is there a helper in rails that will just add the root prefix to urls
based on the environment?

On Dec 24, 9:06 pm, Josh [email protected] wrote:

is there a helper in rails that will just add the root prefix to urls
based on the environment?

If there isn’t, I think you just wrote one. :slight_smile:

///ark

Josh K. wrote:

i’m not sure what to do when my production environment is not in the
root path of the domain when it comes to including things like flash
files.

when testing, everything works great, but since i don’t have a helper
like image_tag, i have to change the url of the flash file each time i
test and then change it back when i deploy the changes.

is there a helper in rails that will just add the root prefix to urls
based on the environment?

you can play around w the different environment files (
environments/development.rb | production.rb | test.rb ) and play around
with either

self.document_root = “/some/path”
or the
RAILS_ROOT constant (also, a “some/path/” string)

nothing here is tested, but i hope this leads to some new info or helps
out digging a little further

good luck!
shai