mirror of
https://github.com/moparisthebest/mailcatcher
synced 2024-12-21 23:08:54 -05:00
Merge pull request #258 from grant-mccarriagher/fix/delete-queries
Fix delete message queries conflicting
This commit is contained in:
commit
420d24e914
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user