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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
kittu.py (Guest)
on 2009-05-22 14:30
(Received via mailing list)
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 ?
This topic is locked and can not be replied to.