class PartnerManagerGroup < ApplicationRecord belongs_to :partner has_many :customers, dependent: :nullify has_many :partner_managers, dependent: :destroy has_many :users, through: :partner_managers, source: :user scope :without_admin, -> { where(admin: false) } end