lib/raven/railtie.rb in sentry-raven-0.4.5 vs lib/raven/railtie.rb in sentry-raven-0.4.6
- old
+ new
@@ -5,10 +5,17 @@
class Railtie < ::Rails::Railtie
initializer "raven.use_rack_middleware" do |app|
app.config.middleware.insert 0, "Raven::Rack"
end
+ initializer 'raven.action_controller' do
+ ActiveSupport.on_load :action_controller do
+ require 'raven/rails/controller_methods'
+ include Raven::Rails::ControllerMethods
+ end
+ end
+
config.after_initialize do
Raven.configure(true) do |config|
config.logger ||= ::Rails.logger
config.project_root ||= ::Rails.root
end
@@ -21,5 +28,6 @@
::ActionDispatch::ShowExceptions.send(:include, Raven::Rails::Middleware::DebugExceptionsCatcher)
end
end
end
end
+