newrelic/rpm — pull request #62 by chingor13 (2012-04-12 17:29:02+00:00)
Title: Fix for Rails 3 view instrumentation

Fix view instrumentation for Rails >= 3.1.0. Rails changed their rendering interface in 3.1 and the gem is trying to hook on to non-existent classes/methods. Also fixed the old implementation to work on Rails 3.0.*.

In Rails >= 3.1, ActionView::Partials::PartialRenderer was moved to ActionView::PartialRenderer. Also, the internal method _render_template is no longer used.

The "rails3_view" was checking for the presence of ActionView::Partials while also enforcing Rails >= 3.1 which is an impossible case. I changed this one to check that Rails == 3.0.* and should work as it was originally written.