simplify check for verified email in collection
This commit is contained in:
parent
d6c58a51e5
commit
3b090bb9a9
1 changed files with 2 additions and 2 deletions
|
@ -70,11 +70,11 @@ class GpgKey < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def verified?
|
def verified?
|
||||||
emails_with_verified_status.any? { |_email, verified| verified }
|
emails_with_verified_status.values.any?
|
||||||
end
|
end
|
||||||
|
|
||||||
def verified_and_belongs_to_email?(email)
|
def verified_and_belongs_to_email?(email)
|
||||||
emails_with_verified_status.any? { |key_email, verified| key_email == email && verified }
|
emails_with_verified_status.fetch(email, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_invalid_gpg_signatures
|
def update_invalid_gpg_signatures
|
||||||
|
|
Loading…
Reference in a new issue