class PContact < ApplicationRecord belongs_to :contactable, :polymorphic => true has_many :p_contact_contact_types, :dependent => :destroy has_many :p_contact_types, :through => :p_contact_contact_types end