rails/rails — pull request #10198 by wangjohn (2013-04-13 00:16:12+00:00)
Title: Adding the available_queries_for_explain thread local into the AR Runtime Registry

Before, the ``:available_queries_for_explain`` thread local could be accessed by using ``Thread.current[:available_queries_for_explain]``. However, the ``ActiveRecord::RuntimeRegistry`` object has recently been added to limit the number of thread locals that are passed around.

This PR moves the handling of ``:available_queries_for_explain`` into the ``RuntimeRegistry`` object and changes the appropriate logic.