Forum: Ruby on Rails record to RTF linefeed problem.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
85ba58eed034056754d3760749897ab9?d=identicon&s=25 Rudy (Guest)
on 2008-12-02 21:47
(Received via mailing list)
Hi, looks like a classic problem, but can't find a real solution
anywhere.
Im using the Ruby rtf plugin. I get a record from the DB with in there
a large textfield, WITH linefeeds. (I can see them in de record in
phpadmin.)
when I export my recordfield to rtf, all the linefeeds/HR/CR 's are
gone.

I've tried all sorts of variantions of this

string = @visit.besproken
 new_string = string.gsub(/\n/,'\par')
 document.paragraph << "#{new_string}"

But nothing really works. Is there a sort of standard way of doing
this? I've been going through all my RoR-books, and searching the
forum, but it stays out of reach.

Many thanks for any suggestion. This forum rocks.
This topic is locked and can not be replied to.