Created
May 30, 2012 09:20
-
-
Save jou/2834968 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/helpers/requirejs_helper.rb b/app/helpers/requirejs_helper.rb | |
index 8de6197..46822c7 100644 | |
--- a/app/helpers/requirejs_helper.rb | |
+++ b/app/helpers/requirejs_helper.rb | |
@@ -52,7 +52,11 @@ module RequirejsHelper | |
# Generate digestified paths from the modules spec | |
paths = {} | |
- modules.each { |m| paths[m] = _javascript_path(m).sub /\.js$/,'' } | |
+ modules.each do |m| | |
+ module_file = m | |
+ module_file += ".js" unless module_file =~ /\.js$/ | |
+ paths[m] = _javascript_path(module_file).sub /\.js$/,'' | |
+ end | |
if run_config.has_key? 'paths' | |
# Add paths for assets specified by full URL (on a CDN) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment