diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-06-22 18:21:03 +0300 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-27 16:43:36 +0300 |
commit | 2ea951454a535ba16693c083c122218b8608329b (patch) | |
tree | 8e64f49145976f263ec57f92a77e0d556b370415 /app/models/gpg_key.rb | |
parent | 9816856d055b33de9c47d9e3b73c4acb99c5b5e6 (diff) |
allow removal of gpg key by nullifying signatures
Diffstat (limited to 'app/models/gpg_key.rb')
-rw-r--r-- | app/models/gpg_key.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/gpg_key.rb b/app/models/gpg_key.rb index a444792581a..bd5d833d68c 100644 --- a/app/models/gpg_key.rb +++ b/app/models/gpg_key.rb @@ -4,6 +4,7 @@ class GpgKey < ActiveRecord::Base KEY_PREFIX = '-----BEGIN PGP PUBLIC KEY BLOCK-----'.freeze belongs_to :user + has_many :gpg_signatures, dependent: :nullify validates :key, presence: true, |