Skip to content
Browse files

Merge pull request #72 from 'jdel/lazyload'

Conflicts:
	lib/airbrake/railtie.rb
  • Loading branch information...
2 parents 4a8994c + 3167c3e commit 4c4238d57f488c4838226657dee0f9f50646594c @shime shime committed Apr 13, 2012
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/airbrake/railtie.rb
View
14 lib/airbrake/railtie.rb
@@ -21,17 +21,17 @@ class Railtie < ::Rails::Railtie
config.framework = "Rails: #{::Rails::VERSION::STRING}"
end
- if defined?(::ActionController::Base)
+ ActiveSupport.on_load(:action_controller) do
require 'airbrake/rails/javascript_notifier'
require 'airbrake/rails/controller_methods'
- ::ActionController::Base.send(:include, Airbrake::Rails::ControllerMethods)
- ::ActionController::Base.send(:include, Airbrake::Rails::JavascriptNotifier)
+ include Airbrake::Rails::JavascriptNotifier
+ include Airbrake::Rails::ControllerMethods
+ end
- if defined?(::ActionDispatch::DebugExceptions)
- require 'airbrake/rails/middleware/debug_exceptions_catcher'
- ::ActionDispatch::DebugExceptions.send(:include,Airbrake::Rails::Middleware::DebugExceptionsCatcher)
- end
+ if defined?(::ActionDispatch::DebugExceptions)
+ require 'airbrake/rails/middleware/debug_exceptions_catcher'
+ ::ActionDispatch::DebugExceptions.send(:include,Airbrake::Rails::Middleware::DebugExceptionsCatcher)
end
end
end

0 comments on commit 4c4238d

Please sign in to comment.
Something went wrong with that request. Please try again.