Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use Rails.application where we want a valid rack app

  • Loading branch information...
commit c1261b5484c10930be9f737abfc164f9ba072629 1 parent d859402
@josh josh authored
View
2  actionpack/lib/action_controller/dispatch/dispatcher.rb
@@ -50,7 +50,7 @@ def define_dispatcher_callbacks(cache_classes)
def new
# DEPRECATE Rails application fallback
- Rails.application.new
+ Rails.application
end
end
end
View
2  actionpack/lib/action_dispatch/testing/integration.rb
@@ -490,7 +490,7 @@ class IntegrationTest < ActiveSupport::TestCase
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)
View
2  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
View
2  railties/test/application/load_test.rb
@@ -40,7 +40,7 @@ def setup
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
Please sign in to comment.
Something went wrong with that request. Please try again.