Use non-deprecated Rails.application instead of ActionController::Dispatcher.new and ActionDispatch::Integration instead of ActionController::Integration for console.

[#4072 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
Teng Siong Ong
2010-02-28 02:21:12 -06:00
committed by Jeremy Kemper
parent 6193be26ce
commit eca46e3102

View File

@@ -17,8 +17,8 @@ end
# create a new session. If a block is given, the new session will be yielded
# to the block before being returned.
def new_session
app = ActionController::Dispatcher.new
session = ActionController::Integration::Session.new(app)
app = Rails.application
session = ActionDispatch::Integration::Session.new(app)
yield session if block_given?
session
end