Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

mail.attachments returns an array which evaluates to true, changed to…

… a size check
  • Loading branch information...
commit 08438b9e1755a77de8056cd156899d76330424cc 1 parent 24c37d2
@davidcornu authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/letter_opener/message.rb
View
2  lib/letter_opener/message.rb
@@ -21,7 +21,7 @@ def initialize(location, mail, part = nil)
def render
FileUtils.mkdir_p(@location)
- if mail.attachments
+ if mail.attachments.size > 0
attachments_dir = File.join(@location,'attachments')
FileUtils.mkdir_p(attachments_dir)
mail.attachments.each do |attachment|
Please sign in to comment.
Something went wrong with that request. Please try again.