Permalink
Browse files

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>
  • Loading branch information...
1 parent 24dbd4b commit 085ebf0368594907fb4b5839834f879295693dce @aaronbatalion aaronbatalion committed with jeremy Nov 19, 2008
@@ -538,12 +538,12 @@ def initialize(template, controller, source, include_host = true)
@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 @@ def test_asset_host_without_protocol_should_use_request_protocol_even_if_path_pr
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

0 comments on commit 085ebf0

Please sign in to comment.