I have a system for the users to be able to post comments.
The comments are grasped into a textarea.
My problem is to format the comments with br tag to replace
Here's what I did:
module ApplicationHelper def nl2br s sanitize(s, tags: []).gsub(/\n/, '').html_safe end end