Since simple_format
does not do what you want, I'd make a simple helper method to convert newlines to <br>
s:
def nl2br(s)
s.gsub(/
/, '<br>')
end
Then in your view you can use it like this:
<%= nl2br(h(@forum_post.message)) %>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…