mirror of
https://github.com/github/rails.git
synced 2026-04-04 03:00:58 -04:00
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:
committed by
Jeremy Kemper
parent
d7f4921a9a
commit
e54c33bfc8
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user