aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/dispatcher.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2008-06-04 11:05:46 +1200
committerMichael Koziarski <michael@koziarski.com>2008-06-04 11:05:46 +1200
commite3c26e9926948587efcc8d31c729395093407df6 (patch)
tree358f418791a56620c32a48776739b4fdf39d3cb0 /actionpack/lib/action_controller/dispatcher.rb
parentb9a9b91a3e3b892ab72ff5c618181747d6b4be04 (diff)
parent8afa725f4b98a6e0ceee4792e8ebaebb6189e5f6 (diff)
downloadrails-e3c26e9926948587efcc8d31c729395093407df6.tar.gz
rails-e3c26e9926948587efcc8d31c729395093407df6.tar.bz2
rails-e3c26e9926948587efcc8d31c729395093407df6.zip
Merge branch 'master' into patches
Diffstat (limited to 'actionpack/lib/action_controller/dispatcher.rb')
-rw-r--r--actionpack/lib/action_controller/dispatcher.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/dispatcher.rb b/actionpack/lib/action_controller/dispatcher.rb
index 6e1e7a261f..fe4f6b4a7e 100644
--- a/actionpack/lib/action_controller/dispatcher.rb
+++ b/actionpack/lib/action_controller/dispatcher.rb
@@ -96,7 +96,7 @@ module ActionController
include ActiveSupport::Callbacks
define_callbacks :prepare_dispatch, :before_dispatch, :after_dispatch
- def initialize(output, request = nil, response = nil)
+ def initialize(output = $stdout, request = nil, response = nil)
@output, @request, @response = output, request, response
end
@@ -123,6 +123,12 @@ module ActionController
failsafe_rescue exception
end
+ def call(env)
+ @request = RackRequest.new(env)
+ @response = RackResponse.new(@request)
+ dispatch
+ end
+
def reload_application
# Run prepare callbacks before every request in development mode
run_callbacks :prepare_dispatch
@@ -135,7 +141,7 @@ module ActionController
# be reloaded on the next request without restarting the server.
def cleanup_application
ActiveRecord::Base.reset_subclasses if defined?(ActiveRecord)
- Dependencies.clear
+ ActiveSupport::Dependencies.clear
ActiveRecord::Base.clear_reloadable_connections! if defined?(ActiveRecord)
end