Permalink
Browse files

Merge pull request #3135 from christos/respect_assets_digest_value

Give precedence to `config.digest = false` over the existence of manifest.yml asset digests
  • Loading branch information...
spastorino committed Sep 26, 2011
1 parent d25bee4 commit 7e43dee85702bc4a96071a0c1ddafec6d8ba7ca4
@@ -123,7 +123,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
@@ -269,4 +269,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 7e43dee

Please sign in to comment.