Make the delete all messages variables not conflict with the delete single message variables.

This commit is contained in:
Grant McCarriagher 2016-01-11 12:23:41 -05:00
parent efd7b4ff0e
commit a6ef2147e0

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)