How can I get my hands on the project's root_path
in my application.js file?
I need it for a js plugin (codemirror) that needs to load other JS files. It's all fine and dandy if I say "/javascripts/needed_file.js", but what if I deploy my project to "/custom".
The code needs to do its magic all over the project and I would like it to be UJS, so it needs to be in a static javascript file.
Any solutions/simple hacks?