lib/mime_builder/file.rb in mime_builder-0.0.4 vs lib/mime_builder/file.rb in mime_builder-0.1.0
- old
+ new
@@ -63,11 +63,12 @@
) if is_attachment
end
def get_attachment_content_disposition(filepath = nil)
filename = File.basename(filepath.to_s)
- return filename.to_s.length > 0 \
- ? "attachment; filename=\"#{filename}\"" \
- : 'attachment'
+ if filename.to_s.length > 0
+ return "attachment; filename=\"#{filename}\""
+ end
+ 'attachment'
end
end
end