lib/new_relic/control/frameworks/rails.rb in newrelic_rpm-3.5.1.alpha vs lib/new_relic/control/frameworks/rails.rb in newrelic_rpm-3.5.1.beta1
- old
+ new
@@ -156,16 +156,15 @@
end
def install_shim
super
require 'new_relic/agent/instrumentation/controller_instrumentation'
- if ActiveSupport.respond_to?(:on_load) # rails 3+
- ActiveSupport.on_load(:action_controller) { include NewRelic::Agent::Instrumentation::ControllerInstrumentation::Shim }
- else
- ActionController::Base.class_eval { include NewRelic::Agent::Instrumentation::ControllerInstrumentation::Shim }
+ if !ActiveSupport.respond_to?(:on_load) # rails 3+
+ ActionController::Base.class_eval do
+ include NewRelic::Agent::Instrumentation::ControllerInstrumentation::Shim
+ end
end
end
-
end
end
end
end