First of all check that the path is being included by running Rails.application.config.assets.paths
in a console. If you see it, try putting <%= asset_path 'zclip.swf' %>
in one of your views. It'll probably just be 'assets/zclip.swf'
whats the path of a file inside vendor assets
-
02-10-2022 - |
Pergunta
this might be an easy one. Im using a plug in to copy text to my clipboard (zclip) that requires me to add a .swf file to my assets.
I added a folder under my vendor>assets>zClip> zclip.swf
then on my javascript it requires that I add the path. what path should I use?
$("#copy-button").zclip({
path: "",
copy:$('.copy_tag').text()
});
thank you so much.
Solução
Outras dicas
Everything in any of the asset paths (app/assets, vendor/assets, any gems or engines) end up as /assets/<resource path>
eventually. So in your case the path would be /assets/zClip/zclip.swf
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow