当前位置: 动力学知识库 > 问答 > 编程问答 >

ruby on rails 3 - Preserving CRLF characters when rendering an ERB file

问题描述:

I'm trying to render an ERB file through Passenger which is saved with DOS-style CRLF line breaks, but the line breaks are getting converted to just LF. Is there an option one can pass to the 'render' method that forces ERB to preserve CRLF line breaks? I'm currently using "render(:content_type => 'text/plain', :layout => false)" but that is not doing the trick.

分享给朋友:
您可能感兴趣的文章:
随机阅读: