Class: HrLite::BenefitEnrolment

Inherits:
ApplicationRecord show all
Includes:
Audited
Defined in:
app/models/hr_lite/benefit_enrolment.rb

Overview

Who is covered, from when. Dependants are a COUNT, not a list — names and dates of birth of somebody's family are data this engine has no reason to hold, and holding them would mean protecting them.

Constant Summary

Constants included from Audited

Audited::REDACTED, Audited::SKIPPED_ATTRIBUTES

Instance Method Summary collapse

Instance Method Details

#live?(on = Date.current) ⇒ Boolean

Returns:

  • (Boolean)


20
# File 'app/models/hr_lite/benefit_enrolment.rb', line 20

def live?(on = Date.current) = enrolled_on <= on && (ended_on.nil? || ended_on >= on)