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