I am currently implementing this JavaScript code:
verify_link.js
...
a=$(this).parent();
a.html('<img src="assets/ajax-loader.gif">');
...
The image file is located in
app/assets/images/ajax-loader.gif
Everything works fine in development, but when I switch to production, the image link appears broken (although it's just a bit hard to notice since it's not showing the spinner).
Would using a Rails path resolve this issue?
As of now, the file is a .js
file. Do I need to convert it to .js.erb
in order to make use of the Rails path effectively?