lib/new_relic/control/frameworks/rails.rb in newrelic_rpm-2.13.4 vs lib/new_relic/control/frameworks/rails.rb in newrelic_rpm-2.13.5.beta1

- old
+ new

@@ -1,9 +1,10 @@ # Control subclass instantiated when Rails is detected. Contains # Rails specific configuration, instrumentation, environment values, # etc. -class NewRelic::Control::Frameworks::Rails < NewRelic::Control +require 'new_relic/control/frameworks/ruby' +class NewRelic::Control::Frameworks::Rails < NewRelic::Control::Frameworks::Ruby def env @env ||= RAILS_ENV.dup end def root @@ -118,13 +119,15 @@ local_env.append_plugin_list do Dir[File.join(root, 'vendor', 'plugins', '*')].collect{ |p| File.basename p if File.directory? p }.compact end end end - + def install_shim super require 'new_relic/agent/instrumentation/controller_instrumentation' - ActionController::Base.send :include, NewRelic::Agent::Instrumentation::ControllerInstrumentation::Shim + ::ActionController::Base.class_eval { + include NewRelic::Agent::Instrumentation::ControllerInstrumentation::Shim + } end - end +