aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Batalion <aaron@hungrymachine.com>2008-11-19 18:10:02 -0500
committerJeremy Kemper <jeremy@bitsweat.net>2008-11-19 15:56:38 -0800
commite54c33bfc8eab7ac482d571ab6bb0285b40fa56b (patch)
tree0793e10640b72409f04718917efc66012415b669
parentd7f4921a9a852da7c1075275eaf73822edb7acff (diff)
downloadrails-e54c33bfc8eab7ac482d571ab6bb0285b40fa56b.tar.gz
rails-e54c33bfc8eab7ac482d571ab6bb0285b40fa56b.tar.bz2
rails-e54c33bfc8eab7ac482d571ab6bb0285b40fa56b.zip
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>
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helper.rb4
-rw-r--r--actionpack/test/template/asset_tag_helper_test.rb6
2 files changed, 8 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
index cdaf6f1926..4352d7819b 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -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
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb
index 1a3a6e86fa..2c0caef583 100644
--- a/actionpack/test/template/asset_tag_helper_test.rb
+++ b/actionpack/test/template/asset_tag_helper_test.rb
@@ -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