From 69c049f5ab45bf9bfb0d269acea0773581905fd4 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 20 Feb 2009 12:04:57 -0600 Subject: Move development mode reloading up the stack to avoid issues with class reloading in middleware --- actionpack/lib/action_controller/reloader.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 actionpack/lib/action_controller/reloader.rb (limited to 'actionpack/lib/action_controller/reloader.rb') diff --git a/actionpack/lib/action_controller/reloader.rb b/actionpack/lib/action_controller/reloader.rb new file mode 100644 index 0000000000..46789309cd --- /dev/null +++ b/actionpack/lib/action_controller/reloader.rb @@ -0,0 +1,14 @@ +module ActionController + class Reloader + def initialize(app) + @app = app + end + + def call(env) + Dispatcher.reload_application + @app.call(env) + ensure + Dispatcher.cleanup_application + end + end +end -- cgit v1.2.3