Call.where('CallContragent' => 123).or.where('CallContact' => [123, 123, 123]) # rails 5
Call.where('CallContragent = ? OR CallContact IN ?', 123, [123, 123, 123]) # rails 4belongs_to :client
belongs_to :contacthas_many :calls
has_many :contacts, through: :calls