Carriage return retrievel using RoR

Luke Pearce <rails-mailing-list@...> writes:

Perhaps make a helper and do the following:

in application helper:
  def format_text(text)
    "<p>" << h(text).gsub(/\n/,"</p><p>") << "</p>"
  end

in view:

<%=format_text( <at> picture.result)%>

There's already a helper in Rails to do this...

<%= simple_format @picture.result %>