javascript - Rails and access to image asset in js scripts -


i'm trying add download animated gif in application.js file, have no idea how access it, i'd like:

$('.pagination').replacewith("<%= image_tag('download.gif') %>"); 

but outputs <%= image_tag('download.gif') %>.

how can access image asset .js script?

you should add .erb filename. application.js.erb , work fine.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -