典型模式: out = ''.html_safe # or ActiveSupport::SafeBuffer.new
out << content_tag(...) if foo
out << 'hello, 1 < 2' # will be escaped properly
out << content_tag(...) if bar
out
這工作得很好。有沒有比這更好,更短,
我有一個數據庫中的列welcome_emil類型TEXT。 我已保存保存在列如下面的代碼內容: Thanks for Joining in! \r\n\r\nYou can loginor refer your friends using your %referral_link%."
當我試圖使這個代碼到我的電子郵件發送給用戶。完整的內容沒問題,但 \r\n\r\n
這被省略,所有文本都