Revert "Revert "Merge pull request #16888 from jejacks0n/render_template""

This reverts commit 585e75696b31395aee895e5366e331c07c3f5ee1.
Fix actionpack test cases broken by #16888