Rails 3.1 Use an image without fingerprint hash

懵懂的女人 提交于 2019-12-12 10:03:08

问题


I have solved a few of my asset pipeline woes, but one of them remains. I have a couple of image_tags, and I want them to refer to the non-fingerprinted/hashed/digested version. Is there a way to force an image_tag (but only one or two, not application-wide) to use the non-digested version of the image?


回答1:


Take a look at fingerprintless, that should do it.




回答2:


Use :digest => false as an option to asset_path within image_tag

<%= image_tag(asset_path("filename.png", :digest => false)) %>


来源:https://stackoverflow.com/questions/9299724/rails-3-1-use-an-image-without-fingerprint-hash

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!