Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

v0.0.4 bugfixes"

  • Loading branch information...
commit f4f66148ea36494b9d794786494f7ee5813979c0 1 parent 87690db
@glebm authored
View
5 app/controllers/rails_email_preview/emails_controller.rb
@@ -16,9 +16,10 @@ def show_raw
if @part_type == 'raw'
body = "<pre id='raw_message'>#{html_escape(@mail.to_s)}</pre>"
else
- body_part = @mail
if @mail.multipart?
- body_part = @mail.parts.find { |part| part.content_type.start_with?(@part_type) } || @mail.parts.first
+ body_part = (@part_type =~ /html/ ? @mail.html_part : @mail.text_part)
+ else
+ body_part = @mail
end
body = body_part.body
if body_part.content_type =~ /plain/
View
4 lib/rails_email_preview/version.rb
@@ -1,3 +1,3 @@
module RailsEmailPreview
- VERSION = '0.0.3'
-end
+ VERSION = '0.0.4'
+end
Please sign in to comment.
Something went wrong with that request. Please try again.