Merged updates from trunk into stable branch
[feedcatcher.git] / vendor / rails / actionpack / lib / action_controller / reloader.rb
diff --git a/vendor/rails/actionpack/lib/action_controller/reloader.rb b/vendor/rails/actionpack/lib/action_controller/reloader.rb
new file mode 100644 (file)
index 0000000..4678930
--- /dev/null
@@ -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