diff options
-rw-r--r-- | railties/lib/rails/application.rb | 6 | ||||
-rw-r--r-- | railties/lib/rails/tasks/middleware.rake | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index e14719c758..ab66d1e90b 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -16,7 +16,11 @@ module Rails alias :configure :class_eval def instance - @instance ||= new + if instance_of?(Rails::Application) + Rails.application.instance + else + @instance ||= new + end end def inherited(base) diff --git a/railties/lib/rails/tasks/middleware.rake b/railties/lib/rails/tasks/middleware.rake index 5a5bd7a7e9..c3aaddb153 100644 --- a/railties/lib/rails/tasks/middleware.rake +++ b/railties/lib/rails/tasks/middleware.rake @@ -3,5 +3,5 @@ task :middleware => :environment do Rails.configuration.middleware.active.each do |middleware| puts "use #{middleware.inspect}" end - puts "run #{Rails.application.class.name}" + puts "run #{Rails::Application.class.name}" end |