diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-10-27 19:05:29 -0700 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-10-27 19:05:47 -0700 |
commit | 86596975be45fa9088fba4db99b67518434f3afc (patch) | |
tree | a4a4ecafa69130bec35bce3de91b1a1485b14ccb /railties/lib | |
parent | 07da304ff84dca9a286005630cd3340f51384465 (diff) | |
download | rails-86596975be45fa9088fba4db99b67518434f3afc.tar.gz rails-86596975be45fa9088fba4db99b67518434f3afc.tar.bz2 rails-86596975be45fa9088fba4db99b67518434f3afc.zip |
Tests pass again
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/application.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/initializable.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 943c939757..26a55a73e1 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -41,13 +41,13 @@ module Rails end def new - initializers.run + run_initializers self end end initializer :initialize_rails do - Rails.initializers.run + Rails.run_initializers end # Set the <tt>$LOAD_PATH</tt> based on the value of diff --git a/railties/lib/rails/initializable.rb b/railties/lib/rails/initializable.rb index affa29239f..c491d5e012 100644 --- a/railties/lib/rails/initializable.rb +++ b/railties/lib/rails/initializable.rb @@ -15,7 +15,7 @@ module Rails class Collection < Array def initialize(klasses) klasses.each do |klass| - klass.added_initializers.each do |initializer| + (klass.added_initializers || []).each do |initializer| index = if initializer.before index_for(initializer.before) elsif initializer.after @@ -44,7 +44,7 @@ module Rails # # The #initializers method is set up to return the right list of # initializers for the context in question. - def initialize! + def run_initializers return if @_initialized initializers.each {|initializer| instance_eval(&initializer.block) } |