Fix `render_to_string` when called via manually instantiated controllers

A fix for #14125

This allows for `render_to_string` to be called from manually instantiated controllers. This used to work in older rails versions but is broken in 4.1.rc1.