Merge pull request #7694 from mfo/US/fix-rubocop-prefer-filter-instead-of-select

fix(rubocop): filter does not exists on strong parameter...
This commit is contained in:
mfo 2022-08-24 15:07:10 +02:00 committed by GitHub
commit aa0891ff3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,9 +17,10 @@ module Manager
end
def bulk_update
procedure_ids = params[:procedure][:ids].filter { |_id, selected| selected == "1" }
# rubocop:disable Style/CollectionMethods
procedure_ids = params[:procedure][:ids].select { |_id, selected| selected == "1" }
.keys
# rubocop:enable Style/CollectionMethods
successes = procedure_ids.map do |id|
procedure = Procedure.find(id)
success = procedure.update(procedure_expires_when_termine_enabled: true)