From a5e509d6b1a26f12fad65a69d01f450c69e136c1 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Wed, 1 Sep 2010 11:07:08 +0200 Subject: We should avoid creating additional initializers when we can, adding them makes boot process slower --- railties/lib/rails/engine.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 4cd4dbd2e8..2028246585 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -441,11 +441,9 @@ module Rails require environment if environment end - initializer :default_asset_path do + initializer :append_asset_paths do config.asset_path = "/#{engine_name}%s" unless config.asset_path - end - initializer :append_asset_paths do public_path = config.paths.public.to_a.first if config.compiled_asset_path && File.exist?(public_path) config.static_asset_paths[config.compiled_asset_path] = public_path -- cgit v1.2.3