Permalink
Browse files

only show rich/plain links if the parts exist

  • Loading branch information...
1 parent eb76541 commit 8e9d77e1d1b47197b448125a614bb2817ccff2f3 @davidcornu committed May 10, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/letter_opener/message.html.erb
@@ -81,9 +81,9 @@
<% if mail.multipart? %>
<p class="alternate">
- <% if type == "plain" %>
+ <% if type == "plain" && mail.html_part %>
<a href="rich.html">View HTML version</a>
- <% else %>
+ <% elsif type == "rich" && mail.text_part %>
<a href="plain.html">View plain text version</a>
<% end %>
</p>

0 comments on commit 8e9d77e

Please sign in to comment.