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

Commit

Permalink
Replace Rails.application.assets to requirejs.env
Browse files Browse the repository at this point in the history
Since we already have Rails env in requirejs.env it doesn't make
any sense to call file_digest from Rails
  • Loading branch information
Strech committed Mar 29, 2016
1 parent f3ad176 commit 94d7d99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tasks/requirejs-rails_tasks.rake
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ OS X Homebrew users can use 'brew install node'.
built_asset_path = requirejs.config.build_dir.join(asset_name)

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

Expand Down

0 comments on commit 94d7d99

Please sign in to comment.