Is there a Railsy way to convert \\n to ?
Currently, I\'m doing it like this:
mystring.gsub(/\\n/, \'\')
Nope. What you have there is the commonly used alternative. The definition most people use is:
def nl2br text text.gsub(/\n/, '') end
It is named as such because it mimics the functionality of the PHP function by the same name.