MiniProfiler/rack-mini-profiler — pull request #54 by amatsuda (2014-02-17 08:01:25+00:00)
Title: Use ActiveSupport.on_load hook to defer ActionController and ActionView initialization

Bundling current version of mini_profiler immediately loads ActionController and ActionView when the gem is required, and thus triggers their whole initializaion scripts, even in situations that ActionView is not actually needed (e.g. booting up the Rails console, executing a model test, running a Rake task, etc.).

Here's a fix to lazy-load AC::Base and AV::Base via ActiveSupport.on_load hook so that these classes are loaded when actually referenced from the application.