rails/rails — pull request #3299 by dcrec1 (2011-10-11 23:29:23+00:00)
Title: Set the Content-Type header as text/plain by default when rendering text. Fixes #3234

Its a little bit hacky but I think it works until some refactoring. First I tried to resolve it creating a renderer:

https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/metal/renderers.rb#L85

but there is a test that renders text with a layout and was failing because the layout wasn't being called.