class Commissioner < ApplicationRecord belongs_to :employee, foreign_key: 'emp_id' belongs_to :commission, foreign_key: 'commission_id' has_many :in_duties has_many :product_commissions scope :active, -> { where(is_active: true) } # validations validates_presence_of :name # Commissioner Image Uploader mount_uploader :image_path, CommissionerImageUploader end