diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-05 15:03:36 +0300 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-27 16:43:37 +0300 |
commit | e79e2ae1f4b671488b31428f7a6506a245a7bddc (patch) | |
tree | ecf76d0362f49611a4de5b57dd7afe9f59f7aae9 /app/models/gpg_key.rb | |
parent | d9fd3709abb7897785ac111c217b532663313abd (diff) |
validate presence of user on gpg_key
Diffstat (limited to 'app/models/gpg_key.rb')
-rw-r--r-- | app/models/gpg_key.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/gpg_key.rb b/app/models/gpg_key.rb index 8cfccef0854..612d954b1c5 100644 --- a/app/models/gpg_key.rb +++ b/app/models/gpg_key.rb @@ -6,6 +6,8 @@ class GpgKey < ActiveRecord::Base belongs_to :user has_many :gpg_signatures, dependent: :nullify + validates :user, presence: true + validates :key, presence: true, uniqueness: true, |