How to save break line in text (at my model)?

If anyone can help me please do.

Thank you,

Rodrigo

Rodrigo Ruiz wrote in post #1017036:

If anyone can help me please do.

I'm guessing about the meaning of your question, which is oddly in the subject of this post rather than the body of the post, but I assume you mean to say that you have a text area where the visitor can type multiple lines of text that gets stored into the database with appropriate new line (i.e. \n) characters.

It's not that the new line characters are not "saved" as you phrased it, but rather that HTML treats all whitespace (i.e. Space, Tab, Carriage Return, Line Feed, etc.) as a single space character.

This simplest solution is to replace LF (or CRLF) characters with the HTML <br /> tag. Fortunately Rails provides a view helper for this purpose called simple_format:

thank you, it worked