开发者

How do you add a timestamp URI to an image_tag in Rails?

开发者 https://www.devze.com 2023-01-20 03:14 出处:网络
Just like the title says : = image_tag @organi开发者_运维知识库zation.logo.url(:cropped) I want this to appear as

Just like the title says :

 = image_tag @organi开发者_运维知识库zation.logo.url(:cropped)

I want this to appear as

<img src="picture.jpg?23412341234" />


Isn't this already the default in Rails?

That's called an asset timestamp and should reflect the latest time that the asset was modified.


Check if you have something as follows in your configuration files (environment.rb, development.rb ...). This line of code disables asset timestamps.

ENV['RAILS_ASSET_ID'] = ''
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号