title: Rails root_path in application.js
body: <p>How can I get my hands on the project's <code>root_path</code> in my <strong>application.js</strong> file?</p>
  
  <p>I need it for a js plugin (<strong>codemirror</strong>) 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".</p>
  
  <p>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.</p>
  
  <p>Any solutions/simple hacks?</p>