lib/superconductor/engine.rb in superconductor-0.0.2 vs lib/superconductor/engine.rb in superconductor-0.0.3
- old
+ new
@@ -1,4 +1,21 @@
module Superconductor
class Engine < Rails::Engine
+ initializer "superconductor.init" do
+ ApplicationController.class_eval do
+ @_exceptions = {}
+ self.rescue_handlers = [] # Overrides rescue handlers on the application controller
+ rescue_from Exception do |exception|
+ #TODO: Handle exceptions through superconductor
+ raise exception
+ end
+
+ before_filter do
+ @_start_time = Time.now.usec
+ end
+ after_filter do
+ response.body += render_to_string(:partial => 'superconductor/panel')
+ end
+ end
+ end
end
end