rails/rails — pull request #5480 by drogus (2012-03-16 22:44:43+00:00)
Title: Fix for #5440

This fixes situation where rendering template to string sets `rendered_format` to the format rendered there. This is ok to have consistent formats rendered in partials, but it breaks on next renders if format is explicitly set or on last render where default format does not necessarily need to be the format of first rendered template.

cc @josevalim