0
0
Fork 0

Fix Style/CombinableLoops cop (#27429)

This commit is contained in:
Matt Jankowski 2023-10-16 10:36:28 -04:00 committed by GitHub
parent c91c0175db
commit 08a376cbcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 14 deletions

View file

@ -21,11 +21,15 @@ class Form::IpBlockBatch
end
def delete!
ip_blocks.each { |ip_block| authorize(ip_block, :destroy?) }
verify_authorization(:destroy?)
ip_blocks.each do |ip_block|
ip_block.destroy
log_action :destroy, ip_block
end
end
def verify_authorization(permission)
ip_blocks.each { |ip_block| authorize(ip_block, permission) }
end
end