Remove source_id as primary key for contact

This commit is contained in:
Pranav Raj Sreepuram
2019-08-31 11:52:09 +05:30
parent df5c9de87e
commit beda21b84c
3 changed files with 13 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ class Conversation < ApplicationRecord
belongs_to :account
belongs_to :inbox
belongs_to :assignee, class_name: 'User', optional: true
belongs_to :sender, class_name: 'Contact', primary_key: :source_id
belongs_to :sender, class_name: 'Contact'
has_many :messages, dependent: :destroy, autosave: true