Class: HrLite::Benefit
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- HrLite::Benefit
- Includes:
- Audited, EncryptedMoney
- Defined in:
- app/models/hr_lite/benefit.rb
Overview
An insurance policy or other benefit the company provides. Employees can finally see what they are covered for without emailing somebody.
Constant Summary collapse
- KINDS =
%w[health life accident other].freeze
Constants included from Audited
Audited::REDACTED, Audited::SKIPPED_ATTRIBUTES
Instance Method Summary collapse
Instance Method Details
#expiring?(within: 30, on: Date.current) ⇒ Boolean
25 26 27 |
# File 'app/models/hr_lite/benefit.rb', line 25 def expiring?(within: 30, on: Date.current) expires_on.present? && expires_on <= on + within && expires_on >= on end |