From: anansi Date: 2007-05-02T19:45:06+09:00 Subject: How to save and display a newlinefeed with rails? Hi, in my little rails application I've made a little database (create.sql) like this: drop table if exists entries; create table entries ( id int not null auto_increment, headline varchar(100) not null, news text not null, date_available datetime not null, primary key (id) ); You see the news which is a text-type. Scaffold did a nice template with these infos where I can type in these data and save it. After that I can print these entries on the screen again with this *.rhtml: <% for entry in @entries -%>

<%= h(entry.headline) %>

<%= entry.news %>
<%= link_to 'read comments', {:action => 'read_comments', :id => entry }, :class => 'read_comments' %>
 
<% end %> 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? -- greets ( ) ( /\ .-"""-. /\ //\\/ ,,, \//\\ |/\| ,;;;;;, |/\| //\\\;-"""-;///\\ // \/ . \/ \\ (| ,-_| \ | / |_-, |) //`__\.-.-./__`\\ // /.-(() ())-.\ \\ (\ |) '---' (| /) ` (| |) ` jgs \) (/ one must still have chaos in oneself to be able to give birth to a dancing star