Unlike most plain text email related questions, my problem is that there are too many line breaks in the plain text emails Rails is sending out.
For simplicity while starting up, I ditched HTML emails altogether and just use plain text emails (using .text.erb views). My problems occur where I have conditional lines in the view, as the new line of code in my view file carries over to the email.
For example:
Line 1
<%= "Line 2" if false %>
Line 3
will render as:
Line 1
Line 3
and not the intended output:
Line 1
Line 3
My current hack is to use the following:
Line 1
<%= "Line 2\n" if false %>Line 3
This can get really messy when there are multiple conditionals in a row.
Surely there must be a better way!
<%= "foo\n" if something -%>
if I wanted the new line if and only if the text is inserted? – Bozo