See [view template handlers](https://github.com/rails/rails/blob/master/actionpack/lib/action_view/template/handlers.rb). This is only intended to be called during app initialization when classes are first loaded into memory, not per request.