diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2012-05-02 14:13:26 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2012-05-02 14:13:26 -0700 |
commit | ebe994f83c717f8ef25dc54490e13bc0dd048188 (patch) | |
tree | bf32852b79aa4b13341c04e3967708cc8bbc9e92 /actionpack/lib | |
parent | 02ca9151a043a4fefbb3f22edd05f0cd392fffaa (diff) | |
parent | 580e767a8e12ee15ac367e6f89489e4ad6d863cc (diff) | |
download | rails-ebe994f83c717f8ef25dc54490e13bc0dd048188.tar.gz rails-ebe994f83c717f8ef25dc54490e13bc0dd048188.tar.bz2 rails-ebe994f83c717f8ef25dc54490e13bc0dd048188.zip |
Merge pull request #6095 from route/assets_precompile_task
Fix that asset precompile didn't respect the index.js convention. Fixes #3993.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/sprockets/static_compiler.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/lib/sprockets/static_compiler.rb b/actionpack/lib/sprockets/static_compiler.rb index 32a9d66e6e..2e2db4b760 100644 --- a/actionpack/lib/sprockets/static_compiler.rb +++ b/actionpack/lib/sprockets/static_compiler.rb @@ -16,6 +16,9 @@ module Sprockets def compile manifest = {} env.each_logical_path do |logical_path| + if File.basename(logical_path)[/[^\.]+/, 0] == 'index' + logical_path.sub!(/\/index\./, '.') + end next unless compile_path?(logical_path) if asset = env.find_asset(logical_path) manifest[logical_path] = write_asset(asset) |