为单个资产禁用使用asset_path的资产指纹识别 [英] Disabling asset fingerprinting with asset_path for a single asset

查看:54
本文介绍了为单个资产禁用使用asset_path的资产指纹识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用常规资产名称,例如在我的视图中调用asset_path帮手时app.js.在生产中,它使用缓存清除名称,例如app-f73cf13e6f100eda6681381e7d3ae9eb.js.

I want to use the normal asset name, e.g. app.js when calling the asset_path helper in my views. In production, it uses the cache-busting name, e.g. app-f73cf13e6f100eda6681381e7d3ae9eb.js.

是否可以使用asset_path获取普通名称?

Is there a way to get the normal name using asset_path?

推荐答案

弄清楚了,实际上很简单.只需将digest: false添加到asset_path即可,

Figured it out, pretty simple actually. Just have to add digest: false to asset_path like so:

asset_path('app.js', digest: false)

这篇关于为单个资产禁用使用asset_path的资产指纹识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆