Module: KmsEncryptedModelPatch
- Extended by:
- KmsEncryptedModelPatch
- Included in:
- KmsEncryptedModelPatch
- Defined in:
- app/models/concerns/kms_encrypted_model_patch.rb
Constant Summary collapse
- KMS_KEY_ROTATION_DATE =
Date.new(Time.zone.today.year, 10, 12)
Instance Method Summary collapse
-
#has_kms_key ⇒ Object
rubocop:disable Naming/PredicateName.
-
#kms_version ⇒ Object
rubocop:enable Naming/PredicateName.
Instance Method Details
#has_kms_key ⇒ Object
rubocop:disable Naming/PredicateName
9 10 11 12 13 |
# File 'app/models/concerns/kms_encrypted_model_patch.rb', line 9 def has_kms_key # implicitly calls #has_kms_key with specified options, so that we don't need to require it # of future encrypted models super(**) end |
#kms_version ⇒ Object
rubocop:enable Naming/PredicateName
16 17 18 |
# File 'app/models/concerns/kms_encrypted_model_patch.rb', line 16 def kms_version Time.zone.today < KMS_KEY_ROTATION_DATE ? Time.zone.today.year - 1 : Time.zone.today.year end |