rails/rails — pull request #5101 by ckdake (2012-02-20 19:42:34+00:00)
Title: Reset memoized hash keys when new ActionView::Template handler is registered

When any code in an initializer or gem load accesses the list of view handlers (ActionView::Template::Handlers.extensions), this gets memoized which prevents new handlers (in my case, adding in Mustache via an initializer using ActionView::Template.register_template_handler) from being made available for use.

This patch resets the memoization so that the next time '.extensions' is called, it includes all extensions that have been registered.