lib/new_relic/control/frameworks/rails.rb in newrelic_rpm-3.1.0 vs lib/new_relic/control/frameworks/rails.rb in newrelic_rpm-3.1.1.beta1

- old
+ new

@@ -1,12 +1,12 @@ -# Control subclass instantiated when Rails is detected. Contains -# Rails specific configuration, instrumentation, environment values, -# etc. require 'new_relic/control/frameworks/ruby' module NewRelic class Control module Frameworks + # Control subclass instantiated when Rails is detected. Contains + # Rails specific configuration, instrumentation, environment values, + # etc. class Rails < NewRelic::Control::Frameworks::Ruby def env @env ||= RAILS_ENV.dup end @@ -137,11 +137,11 @@ } end def _install_instrumentation super - if defined?(Rails) && Rails.respond_to?(:configuration) && Rails.configuration.respond_to?(:after_initialize) - Rails.configuration.after_initialize do + if defined?(::Rails) && ::Rails.respond_to?(:configuration) && ::Rails.configuration.respond_to?(:after_initialize) + ::Rails.configuration.after_initialize do DependencyDetection.detect! end end end end