Convert \n newlines to html <br>


I have a textarea that accepts a shipping address, so I need to convert
newlines when it is displayed as html. I am new to ruby, and rails so an
example would be appreciated. I want to do this in the ‘display’, not
the stored text if possible, since I use the newlines when generating a


<%= address.gsub(/\n/, ‘
’) %>


 Nathaniel S. H. Brown                 


Or use RedCloth:

gem install redcloth


You can do as much formatting as you like.