Fix links to attachments (Thanks Ben!)

This commit is contained in:
Samuel Cochran 2011-12-04 22:26:09 +08:00
parent 428e7cdf1e
commit e5c8ef9b08

View File

@ -53,7 +53,7 @@ class MailCatcher::Web < Sinatra::Base
("plain" if MailCatcher::Mail.message_has_plain? id),
].compact,
"attachments" => MailCatcher::Mail.message_attachments(id).map do |attachment|
attachment.merge({"href" => "/messages/#{escape(id)}/#{escape(attachment['cid'])}"})
attachment.merge({"href" => "/messages/#{escape(id)}/parts/#{escape(attachment['cid'])}"})
end,
}).to_json
else