added active count induties

This commit is contained in:
Myat Zin Wai Maw
2019-06-18 11:02:01 +06:30
parent 784c090ff8
commit 4ef7eef803
4 changed files with 25 additions and 12 deletions

View File

@@ -1,7 +1,7 @@
class Commissioner < ApplicationRecord
belongs_to :employee, foreign_key: 'emp_id'
belongs_to :commission, foreign_key: 'commission_id'
has_many :in_juties
has_many :in_duties
has_many :product_commissions
scope :active, -> { where(is_active: true) }