Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit e54c33bfc8eab7ac482d571ab6bb0285b40fa56b 1 parent d7f4921
Aaron Batalion aaronbatalion authored jeremy committed
4 actionpack/lib/action_view/helpers/asset_tag_helper.rb
View
@@ -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
6 actionpack/test/template/asset_tag_helper_test.rb
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.