Skip to content
This repository
Browse code

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 authored November 19, 2008 jeremy committed November 19, 2008
4  actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -538,12 +538,12 @@ def initialize(template, controller, source, include_host = true)
538 538
             @source = source
539 539
             @include_host = include_host
540 540
             @cache_key = if controller.respond_to?(:request)
541  
-              [controller.request.protocol,
  541
+              [self.class.name,controller.request.protocol,
542 542
                ActionController::Base.asset_host,
543 543
                ActionController::Base.relative_url_root,
544 544
                source, include_host]
545 545
             else
546  
-              [ActionController::Base.asset_host, source, include_host]
  546
+              [self.class.name,ActionController::Base.asset_host, source, include_host]
547 547
             end
548 548
           end
549 549
           
6  actionpack/test/template/asset_tag_helper_test.rb
@@ -648,4 +648,10 @@ def test_asset_host_without_protocol_should_use_request_protocol_even_if_path_pr
648 648
   ensure
649 649
     ActionController::Base.asset_host = nil
650 650
   end
  651
+
  652
+  def test_assert_css_and_js_of_the_same_name_return_correct_extension
  653
+    assert_dom_equal(%(/collaboration/hieraki/javascripts/foo.js), javascript_path("foo"))
  654
+    assert_dom_equal(%(/collaboration/hieraki/stylesheets/foo.css), stylesheet_path("foo"))
  655
+
  656
+  end
651 657
 end

0 notes on commit e54c33b

Please sign in to comment.
Something went wrong with that request. Please try again.