I have a description text field in my Model. No I want to add this description on the show page. But the text renders ugly because of no linebreaks.
If i replace them with <br/>
then the rails escape them with.
So i tried to use the raw() method.
I want to escape bad HTML but have the linebreaks in my output.
I end up with some ugly code.
raw(h(@place.description.gsub("\n","#linebreak#")).gsub("#linebreak#","<br/>"))
Do you have any suggestions?