Browse files

Fix #3993 assets:precompile task does not detect index files

  • Loading branch information...
1 parent 5fe88b1 commit df8457748ebbfa092c4c10aedda57aeef2f28776 @route route committed Apr 30, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 actionpack/lib/sprockets/static_compiler.rb
View
3 actionpack/lib/sprockets/static_compiler.rb
@@ -16,6 +16,9 @@ def initialize(env, target, paths, options = {})
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)

0 comments on commit df84577

Please sign in to comment.