From: anansi Date: 2007-05-02T21:00:05+09:00 Subject: Re: How to save and display a newlinefeed with rails? arghh thanks for your help, wokrs great :) Alex Young wrote: > anansi wrote: > >> <%= entry.news %>
> >> But the problem is that I have now textformatting inside the >> entry.news field. E.g. how can I insert
after each line in >> entry.news? > > <%= entry.news.split("\n").join("
") %> > > or > > <%= entry.news.gsub("\n", "
") %> > -- greets ( ) ( /\ .-"""-. /\ //\\/ ,,, \//\\ |/\| ,;;;;;, |/\| //\\\;-"""-;///\\ // \/ . \/ \\ (| ,-_| \ | / |_-, |) //`__\.-.-./__`\\ // /.-(() ())-.\ \\ (\ |) '---' (| /) ` (| |) ` jgs \) (/ one must still have chaos in oneself to be able to give birth to a dancing star