diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-10-16 19:04:28 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-10-16 19:04:28 -0500 |
commit | c1261b5484c10930be9f737abfc164f9ba072629 (patch) | |
tree | 65e63de01ec16de8ddfe534c54bf637764195d41 | |
parent | d8594026962704b6b51e188a29406fbd22bb31ce (diff) | |
download | rails-c1261b5484c10930be9f737abfc164f9ba072629.tar.gz rails-c1261b5484c10930be9f737abfc164f9ba072629.tar.bz2 rails-c1261b5484c10930be9f737abfc164f9ba072629.zip |
Use Rails.application where we want a valid rack app
4 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/dispatch/dispatcher.rb b/actionpack/lib/action_controller/dispatch/dispatcher.rb index 008fb54715..e04da42637 100644 --- a/actionpack/lib/action_controller/dispatch/dispatcher.rb +++ b/actionpack/lib/action_controller/dispatch/dispatcher.rb @@ -50,7 +50,7 @@ module ActionController def new # DEPRECATE Rails application fallback - Rails.application.new + Rails.application end end end diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index 58ebe94a5b..40d6f97b2a 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -490,7 +490,7 @@ module ActionDispatch def self.app # DEPRECATE Rails application fallback # This should be set by the initializer - @@app || (defined?(Rails.application) && Rails.application.new) || nil + @@app || (defined?(Rails.application) && Rails.application) || nil end def self.app=(app) diff --git a/railties/lib/rails/generators/rails/app/templates/config.ru b/railties/lib/rails/generators/rails/app/templates/config.ru index f854029193..509a0da5b7 100644 --- a/railties/lib/rails/generators/rails/app/templates/config.ru +++ b/railties/lib/rails/generators/rails/app/templates/config.ru @@ -2,4 +2,4 @@ require ::File.expand_path('../config/environment', __FILE__) # Dispatch the request -run Rails.application.new +run Rails.application diff --git a/railties/test/application/load_test.rb b/railties/test/application/load_test.rb index 5c3d35fb16..3da51c4355 100644 --- a/railties/test/application/load_test.rb +++ b/railties/test/application/load_test.rb @@ -40,7 +40,7 @@ module ApplicationTests test "Rails.application is available after config.ru has been racked up" do rackup - assert Rails.application.new < Rails::Application + assert Rails.application < Rails::Application end # Passenger still uses AC::Dispatcher, so we need to |