Permalink
Browse files

Give precedence to `config.digest = false` over manifest.yml asset di…

…gests
  • Loading branch information...
1 parent a15424b commit 793e9da63d74a082281d41c2bc90e7bd02adcde4 Christos Zisopoulos committed Sep 26, 2011
@@ -114,7 +114,7 @@ def asset_for(source, ext)
end
def digest_for(logical_path)
- if asset_digests && (digest = asset_digests[logical_path])
+ if digest_assets && asset_digests && (digest = asset_digests[logical_path])
return digest
end
@@ -262,4 +262,12 @@ def url_for(*args)
assert_not_equal prod_path, dev_path
end
+
+ test "precedence of `config.digest = false` over manifest.yml asset digests" do
+ Rails.application.config.assets.digests = {'logo.png' => 'logo-d1g3st.png'}
+ @config.assets.digest = false
+
+ assert_match %r{/assets/logo.png},
+ asset_path("logo.png")
+ end
end

0 comments on commit 793e9da

Please sign in to comment.