Permalink
Browse files

We should avoid creating additional initializers when we can, adding …

…them makes boot process slower
  • Loading branch information...
1 parent bf1ac82 commit a5e509d6b1a26f12fad65a69d01f450c69e136c1 @drogus drogus committed Sep 1, 2010
Showing with 1 addition and 3 deletions.
  1. +1 −3 railties/lib/rails/engine.rb
@@ -441,11 +441,9 @@ def config
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

0 comments on commit a5e509d

Please sign in to comment.