Skip to content

Commit 161f87b

Browse files
authored
Merge pull request #158 from dmitri-d/use-activesupport-digest
Use ActiveSupport::Digest when available
2 parents ffcbaff + 9f33843 commit 161f87b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/angular-rails-templates/engine.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ class Engine < ::Rails::Engine
3737

3838
# Sprockets Cache Busting
3939
# If ART's version or settings change, expire and recompile all assets
40+
hash_digest = defined?(ActiveSupport::Digest) ? ActiveSupport::Digest : Digest::MD5
4041
app.config.assets.version = [
4142
app.config.assets.version,
4243
'ART',
43-
Digest::MD5.hexdigest("#{VERSION}-#{app.config.angular_templates}")
44+
hash_digest.hexdigest("#{VERSION}-#{app.config.angular_templates}")
4445
].join '-'
4546
end
4647

0 commit comments

Comments
 (0)