Hello and apologies for what seems like a simple problem.
When using directory_indexes the javascript_link_tag gives a link relative to the current dir instead of the root directory.
The easy solution would be to provide an absolute path but this breaks the ability to easily test and deploy in multiple environments. Is there an option I can pass to tell it to build a path to the root asset folder.
Examples (assuming a script called script.js)
Working:
A request to www.example.com correctly loads /javascripts/script.js from www.example.com/javascripts/script.js
Not Working
A request to www.example.com/about_us attempts to load the script from www.example.com/about_us/javascripts/script.js
Thanks in advance :)