Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

AssetTagHelper.cache_asset_timestamps Issue

#5463

When setting the cache_asset_timestamps attribute to false I get inconsistent results:

(rdb:1) ActionView::Helpers::AssetTagHelper.cache_asset_timestamps
false
(rdb:1) image_tag "elements/menu-icons/menu-icon-1.png"
"<img alt=\"Menu-icon-1\" src=\"/images/elements/menu-icons/menu-icon-1.png?1282629255\" />"
(rdb:1) image_tag "elements/menu-icon-1.png"
"<img alt=\"Menu-icon-1\" src=\"/images/elements/menu-icon-1.png\" />"

As you can see, the cache_asset_id still shows up on the first one, but not for the other. From what I've found, if the file exists, it adds the cache id, if it doesn't exist, then it does not add the cache id.

Am I misunderstanding the cache_asset_timestamps attribute or is this a bug?

If I am misunderstanding this, how can I make the cached id on the end of the src attribute not be included?

I am running:

ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]
rails off of git branch 3-0-stable

Thanks,
Matt

Reported by Matt Simpson · August 26th, 2010 @ 06:33 AM

State: invalid
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Matt Simpson
    Matt Simpson

    also would solve my problem if I could somehow get that cache id so that I can make an assertion with it.

    August 26th, 2010 @ 06:36 AM

  2. Neeraj Singh
    Neeraj Singh
    • Importance changed from to Low

    I am not able to reproduce it. Can you lay out exactly step by step how you produced the problem.

    August 28th, 2010 @ 05:38 AM

  3. David Trasbo
    David Trasbo
    • State changed from new to invalid

    Marking as invalid for now. Will reopen if Matt shares some more detail on how to reproduce.

    September 20th, 2010 @ 08:20 PM