Reputation: 21261
I'm sending an email through my rails app with the message in the email being entered by the user into a text_area. For some reason though when I receive the email message, the newlines are missing. How can I get those back when rendering the email template?
Here's the whole of my email template:
<html>
<head>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
</head>
<body>
<p>
<%= @message %>
</p>
</body>
</html>
Upvotes: 0
Views: 114
Reputation: 300
Try to use simple_format(@var)
.
http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#method-i-simple_format
Upvotes: 1