mirror of
https://github.com/moparisthebest/mailcatcher
synced 2024-10-31 15:35:07 -04: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
|
end
|
||||||
|
|
||||||
def delete!
|
def delete!
|
||||||
@delete_messages_query ||= db.prepare "DELETE FROM message"
|
@delete_all_messages_query ||= db.prepare "DELETE FROM message"
|
||||||
@delete_message_parts_query ||= db.prepare "DELETE FROM message_part"
|
@delete_all_message_parts_query ||= db.prepare "DELETE FROM message_part"
|
||||||
|
|
||||||
@delete_messages_query.execute and
|
@delete_all_messages_query.execute and
|
||||||
@delete_message_parts_query.execute
|
@delete_all_message_parts_query.execute
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete_message!(message_id)
|
def delete_message!(message_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user