Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…gests
  • Loading branch information...
commit 793e9da63d74a082281d41c2bc90e7bd02adcde4 1 parent a15424b
@christos christos authored
View
2  actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -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
View
8 actionpack/test/template/sprockets_helper_test.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.