need to make sure the asset type is cached with it in Cache.. name is sufficient, not self

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
Aaron Batalion
2008-11-19 18:10:02 -05:00
committed by Jeremy Kemper
parent d7f4921a9a
commit e54c33bfc8
2 changed files with 8 additions and 2 deletions

View File

@@ -538,12 +538,12 @@ module ActionView
@source = source
@include_host = include_host
@cache_key = if controller.respond_to?(:request)
[controller.request.protocol,
[self.class.name,controller.request.protocol,
ActionController::Base.asset_host,
ActionController::Base.relative_url_root,
source, include_host]
else
[ActionController::Base.asset_host, source, include_host]
[self.class.name,ActionController::Base.asset_host, source, include_host]
end
end

View File

@@ -648,4 +648,10 @@ class AssetTagHelperNonVhostTest < ActionView::TestCase
ensure
ActionController::Base.asset_host = nil
end
def test_assert_css_and_js_of_the_same_name_return_correct_extension
assert_dom_equal(%(/collaboration/hieraki/javascripts/foo.js), javascript_path("foo"))
assert_dom_equal(%(/collaboration/hieraki/stylesheets/foo.css), stylesheet_path("foo"))
end
end