title: Rails: Converting a text field's linebreaks into <br />
body: <p>I have a text field in my model called 'about', which I'm trying to display on a show page, but none of the line breaks are showing up properly.</p>
  
  <p>I've tried a number of things, but the code I finally landed on is:</p>
  
  <pre><code>&lt;%= (h @template.about).gsub("\n", "&lt;br /&gt;") %&gt;
  </code></pre>
  
  <p>Unfortunately, Rails seems to be escaping the desired HTML and outputting these line breaks as </p>
  
  <pre><code>Thanks for the fish, guys! Not like I wanted it, but... uh... thanks? &amp;lt;br /&amp;gt;
  </code></pre>
  
  <p>How can I properly convert the text field's "\n" linebreaks into actual linebreak HTML? I've already tried simple format as well, to no avail...</p>
  
  <p>I'm using Rails 3, and the first few lines of 'about' are:</p>
  
  <blockquote>
    <p>Thanks for the fish, guys! Not like I wanted it, but... uh... thanks? <br> 
    "I'll be the judge of that," he said! <br>And now, more useless copy so I can isolate that weird bud that Amanda found. <br>
    Wait! I meant 'weird bug...' </p>
  </blockquote>