You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/models/partner_manager_group.rb

10 lines
279 B

5 years ago
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