From a4518517f77055cea0d9fe552d2df393140679de Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 12 Apr 2011 22:12:27 -0500 Subject: Index sprockets environment if perform caching is enabled --- railties/lib/rails/application/finisher.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'railties/lib/rails/application') diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index be063e5f25..bae464a840 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -48,6 +48,12 @@ module Rails end end + initializer :index_sprockets_environment do |app| + if config.assets.enabled && config.action_controller.perform_caching + app.assets = app.assets.index + end + end + initializer :build_middleware_stack do build_middleware_stack end -- cgit v1.2.3