开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜