1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Use Rails.application where we want a valid rack app

This commit is contained in:
Joshua Peek 2009-10-16 19:04:28 -05:00
parent d859402696
commit c1261b5484
4 changed files with 4 additions and 4 deletions

View file

@ -50,7 +50,7 @@ module ActionController
def new
# DEPRECATE Rails application fallback
Rails.application.new
Rails.application
end
end
end

View file

@ -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)

View file

@ -2,4 +2,4 @@
require ::File.expand_path('../config/environment', __FILE__)
# Dispatch the request
run Rails.application.new
run Rails.application

View file

@ -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