allow removal of gpg key by nullifying signatures
This commit is contained in:
parent
9816856d05
commit
2ea951454a
|
@ -4,6 +4,7 @@ class GpgKey < ActiveRecord::Base
|
||||||
KEY_PREFIX = '-----BEGIN PGP PUBLIC KEY BLOCK-----'.freeze
|
KEY_PREFIX = '-----BEGIN PGP PUBLIC KEY BLOCK-----'.freeze
|
||||||
|
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
has_many :gpg_signatures, dependent: :nullify
|
||||||
|
|
||||||
validates :key,
|
validates :key,
|
||||||
presence: true,
|
presence: true,
|
||||||
|
|
Loading…
Reference in New Issue