Merge pull request #258 from grant-mccarriagher/fix/delete-queries

Fix delete message queries conflicting
This commit is contained in:
Samuel Cochran 2016-01-18 13:56:19 +11:00
commit 420d24e914

View File

@ -144,11 +144,11 @@ module MailCatcher::Mail extend self
end
def delete!
@delete_messages_query ||= db.prepare "DELETE FROM message"
@delete_message_parts_query ||= db.prepare "DELETE FROM message_part"
@delete_all_messages_query ||= db.prepare "DELETE FROM message"
@delete_all_message_parts_query ||= db.prepare "DELETE FROM message_part"
@delete_messages_query.execute and
@delete_message_parts_query.execute
@delete_all_messages_query.execute and
@delete_all_message_parts_query.execute
end
def delete_message!(message_id)