Skip to content

Commit

Permalink
If Textile support not available for emails, convert newlines to html…
Browse files Browse the repository at this point in the history
… breaks
  • Loading branch information
ndbroadbent committed Jun 13, 2012
1 parent 44afd64 commit 3098fdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/polymorphic/email.rb
Expand Up @@ -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
Expand Down

0 comments on commit 3098fdc

Please sign in to comment.