i replaced line feed characters with HTML line break as
@post.description.gsub(/\n/, "<br/>")
I am trying to show the output within
tags. But I see as follows:
Used, like new book<br/>New book costs $150<br/>Awesome book!
Need help. Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use
simple_formatfor this as it will automatically convert new lines into breaks.