fix: Current.user nil issue when using access tokens (#2012)

This commit is contained in:
Sojan Jose
2021-03-29 23:26:20 +05:30
committed by GitHub
parent 24fea5fbe0
commit 6bb026621d
5 changed files with 8 additions and 5 deletions

View File

@@ -31,6 +31,7 @@ class Contact < ApplicationRecord
validates :account_id, presence: true
validates :email, allow_blank: true, uniqueness: { scope: [:account_id], case_sensitive: false }
validates :identifier, allow_blank: true, uniqueness: { scope: [:account_id] }
validates :phone_number, allow_blank: true, uniqueness: { scope: [:account_id] }
belongs_to :account
has_many :conversations, dependent: :destroy