Forum: Ruby on Rails how to get the path prefix ?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms. (Guest)
on 2009-05-22 14:30
(Received via mailing list)

I started my rails application using mongrel with --prefix=/myapp;
I have a javascript file where it makes an ajax call to '/get_pics';
But this fails when I use --prefix option;

is there a method in rails which will return the path prefix (in this
case its: myapp);
so that I can assign it to a javascript variable 'PATH' in my layout
and then make an ajax call to  ( PATH + '/get_pics') ?

OR Is there any other way to solve this problem ?
This topic is locked and can not be replied to.