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
Post a Comment