diff options
author | Dmitry Vorotilin <d.vorotilin@gmail.com> | 2012-05-01 03:53:13 +0400 |
---|---|---|
committer | Dmitry Vorotilin <d.vorotilin@gmail.com> | 2012-05-01 03:53:13 +0400 |
commit | df8457748ebbfa092c4c10aedda57aeef2f28776 (patch) | |
tree | f747ea6907bdd1071f29f3389212143c0f593ef5 /actionpack/lib | |
parent | 5fe88b11f11bb3b30bc23c57b36be4f027d915ba (diff) | |
download | rails-df8457748ebbfa092c4c10aedda57aeef2f28776.tar.gz rails-df8457748ebbfa092c4c10aedda57aeef2f28776.tar.bz2 rails-df8457748ebbfa092c4c10aedda57aeef2f28776.zip |
Fix #3993 assets:precompile task does not detect index files
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) |