From 9256745193ebbac141df4620d43c421eb52bdd61 Mon Sep 17 00:00:00 2001 From: Ronald Walker Date: Sun, 17 Nov 2019 19:27:41 -0800 Subject: [PATCH] remove 'inbox' attribute on Contact and use join table(ContactInbox) instead (#214) --- db/seeds.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/seeds.rb b/db/seeds.rb index 75632f447..1ba0711e4 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -9,6 +9,7 @@ web_widget = Channel::WebWidget.create!(account: account, website_name: 'Acme', inbox = Inbox.create!(channel: web_widget, account: account, name: 'Acme Support') InboxMember.create!(user: user, inbox: inbox) -contact = Contact.create!(name: 'jane', email: 'jane@example.com', phone_number: '0000', inbox: inbox, account: account) +contact = Contact.create!(name: 'jane', email: 'jane@example.com', phone_number: '0000', account: account) +ContactInbox.create!(inbox: inbox, contact: contact, source_id: user.id) conversation = Conversation.create!(account: account, inbox: inbox, status: :open, assignee: user, contact: contact) Message.create!(content: 'Hello', account: account, inbox: inbox, conversation: conversation, message_type: :incoming) \ No newline at end of file