newlines in text_area

Hi @ all
I would like to enter a text with a text_area into the database. It runs
excellent. But when I want to show the entered text in the show view,
all newlines (paragraphs) are deleted and the text is only one block.

How can I save the returns (newlines) too?

Thanks for helping!!

K. R. :

I would like to enter a text with a text_area into the database. It runs
excellent. But when I want to show the entered text in the show view,
all newlines (paragraphs) are deleted and the text is only one block.

How can I save the returns (newlines) too?

simple_format helper can be useful :
http://api.rubyonrails.com/classes/ActionView/Helpers/TextHelper.html#M001057

   -- Jean-François.

Gives it other solutions to display the text in the originally format
with paragraphs and so on...?

Jean-François Trân wrote:

simple_format does that.

Alternatively:

<%= @string.gsub("\n","
") %>

great, thanks for helping @ all!