How to get the path prefix?

Hi,

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 ?