lib/goatmail/message.rb in goatmail-1.1.0 vs lib/goatmail/message.rb in goatmail-1.1.1

- old
+ new

@@ -49,9 +49,13 @@ @attachments ||= Dir["#{base_dir}/attachments/*"].each_with_object({}) do |file, hash| hash[File.basename(file)] = File.expand_path(file) end end + def path + File.exist?(File.join(base_dir, "rich.html")) ? "#{id}.html" : id + end + private def base_dir "#{self.class.location}/#{id}" end