Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit 94d7d99

Browse files
committed
Replace Rails.application.assets to requirejs.env
Since we already have Rails env in requirejs.env it doesn't make any sense to call file_digest from Rails
1 parent f3ad176 commit 94d7d99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/tasks/requirejs-rails_tasks.rake

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ OS X Homebrew users can use 'brew install node'.
162162
built_asset_path = requirejs.config.build_dir.join(asset_name)
163163

164164
# Compute the digest based on the contents of the compiled file, *not* on the contents of the RequireJS module.
165-
file_digest = ::Rails.application.assets.file_digest(built_asset_path.to_s)
165+
file_digest = requirejs.env.file_digest(built_asset_path.to_s)
166166
hex_digest = file_digest.unpack("H*").first
167167
digest_name = asset.logical_path.gsub(path_extension_pattern) { |ext| "-#{hex_digest}#{ext}" }
168168

0 commit comments

Comments
 (0)