diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-09-01 11:07:08 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-09-03 22:59:15 +0200 |
commit | a5e509d6b1a26f12fad65a69d01f450c69e136c1 (patch) | |
tree | 108878ce93f6d478b2628cbf6e28dd134b885e61 /railties/lib/rails | |
parent | bf1ac82cecfb3291a9bc215974b385a1b3ccb545 (diff) | |
download | rails-a5e509d6b1a26f12fad65a69d01f450c69e136c1.tar.gz rails-a5e509d6b1a26f12fad65a69d01f450c69e136c1.tar.bz2 rails-a5e509d6b1a26f12fad65a69d01f450c69e136c1.zip |
We should avoid creating additional initializers when we can, adding them makes boot process slower
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/engine.rb | 4 |
1 files changed, 1 insertions, 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 |