Skip to content
Browse files

If Textile support not available for emails, convert newlines to html…

… breaks
  • Loading branch information...
1 parent 44afd64 commit 3098fdc8c6ff49d3578de62fb030828850ba30ee @ndbroadbent ndbroadbent committed Jun 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/models/polymorphic/email.rb
View
2 app/models/polymorphic/email.rb
@@ -55,7 +55,7 @@ def body_with_textile
if defined?(RedCloth)
RedCloth.new(body_without_textile).to_html.html_safe
else
- body_without_textile
+ body_without_textile.to_s.gsub("\n", "<br/>").html_safe
end
end
alias_method_chain :body, :textile

0 comments on commit 3098fdc

Please sign in to comment.
Something went wrong with that request. Please try again.