Commit a5f04df8 authored by Alexis Reigel's avatar Alexis Reigel
Browse files

update all records at once using `update_all`

parent 14c1d6994c2f
...@@ -77,12 +77,11 @@ def update_invalid_gpg_signatures ...@@ -77,12 +77,11 @@ def update_invalid_gpg_signatures
end end
def revoke def revoke
GpgSignature.where(gpg_key: self, valid_signature: true).find_each do |gpg_signature| GpgSignature.where(gpg_key: self, valid_signature: true).update_all(
gpg_signature.update_attributes!( gpg_key_id: nil,
gpg_key: nil, valid_signature: false,
valid_signature: false updated_at:
) )
destroy destroy
end end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment