I have a table in my rails project, which contains a column of type string. One of the entries for this column is “one\ntwo”. When I try to display the table, that entry is displayed as “one two”. I serialized the entry, so I tried displaying an inspected version as well, which displayed “one\ntwo”. Is there any way to display that entry as following?
one
two
s.gsub(/\n/, '<br>')try this, and play with sanitize or maybe html_safe