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.

AssetTag#compute_public_path caching should depend on given parameter

#1471

I have some classes extending AssetTag and friends (awesome refactoring, Josh!) to allow assets to be cached to different paths depending on an active theme.

Code worked find until recently. This broke it: http://github.com/rails/rails/co...

Fix is attached. I'm aware that I'm using #compute_public_path which is not protected, but private, so probably not recommended to be used by extending classes. Nonetheless I feel that the offending line is a bug: when compute_public_path takes a parameter source then it should return different results for different sources, or shouldn't it?

Anyway, I guess the patch doesn't hurt anybody :)

I'm adding a separate patch for a test because when looking at the tests for asset_tag_helper I found that the internal api is not tested at all, so I was unsure if there even should be a test for this particular thing. I believe there should be one, so I'll attach the patch for that as well.

Reported by Sven Fuchs · November 25th, 2008 @ 07:18 PM

State: resolved
Milestone: none
Assigned to: josh josh
Importance: none

Activity

  1. Sven Fuchs
  2. DHH
    DHH
    • Milestone cleared.

    November 26th, 2008 @ 12:16 PM

  3. Repository
    Repository
    • State changed from new to resolved

    (from [1182658e767d2db4a46faed35f0b1075c5dd9a88]) Make sure #compute_public_path caching allows to return different results for different given sources [#1471 AssetTag#compute_public_path caching should depend on given parameter state:resolved]

    Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...

    November 29th, 2008 @ 10:05 PM

  4. Repository
    Repository

    (from [bc36b07d14b4309a78e65cdb0d2984e163f847a3]) Make sure #compute_public_path caching allows to return different results for different given sources [#1471 AssetTag#compute_public_path caching should depend on given parameter state:resolved] http://github.com/rails/rails/co...

    January 2nd, 2009 @ 11:15 AM