diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-25 22:59:08 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-25 22:59:08 +0100 |
commit | 02908e11425069e5b91cbf8ec3c8344a58493ef8 (patch) | |
tree | 29e713a53211774691e2cd6f2fa5dd629fd5ae27 /railties/lib/rails | |
parent | 1177a40e68b6661d6d2cb4aefdd9a805459cd936 (diff) | |
download | rails-02908e11425069e5b91cbf8ec3c8344a58493ef8.tar.gz rails-02908e11425069e5b91cbf8ec3c8344a58493ef8.tar.bz2 rails-02908e11425069e5b91cbf8ec3c8344a58493ef8.zip |
As first step setup the load path and lazy compare middlewares.
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/application/bootstrap.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/engine.rb | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/railties/lib/rails/application/bootstrap.rb b/railties/lib/rails/application/bootstrap.rb index 3c339ffc57..f038027c97 100644 --- a/railties/lib/rails/application/bootstrap.rb +++ b/railties/lib/rails/application/bootstrap.rb @@ -76,6 +76,10 @@ module Rails initializer :initialize_dependency_mechanism do |app| ActiveSupport::Dependencies.mechanism = app.config.cache_classes ? :require : :load end + + initializer :bootstrap_load_path do + # This is just an initializer used as hook so all load paths are loaded together + end end end end
\ No newline at end of file diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index a9c94bc020..8cb938c2b9 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -47,7 +47,7 @@ module Rails end # Add configured load paths to ruby load paths and remove duplicates. - initializer :set_load_path do + initializer :set_load_path, :before => :bootstrap_load_path do config.load_paths.reverse_each do |path| $LOAD_PATH.unshift(path) if File.directory?(path) end @@ -56,7 +56,7 @@ module Rails # Set the paths from which Rails will automatically load source files, # and the load_once paths. - initializer :set_autoload_paths do |app| + initializer :set_autoload_paths, :before => :bootstrap_load_path do |app| ActiveSupport::Dependencies.load_paths.unshift(*config.load_paths) if reloadable?(app) |