If anyone can help me please do.
Thank you,
Rodrigo
If anyone can help me please do.
Thank you,
Rodrigo
Rodrigo R. 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
tag. Fortunately Rails provides a view helper for this
purpose called simple_format:
thank you, it worked
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs