clean(code): stick to usage of present?/empty? instead of count zero etc

This commit is contained in:
Martin 2022-12-06 11:19:08 +01:00 committed by mfo
parent 8f1478b00f
commit 91ef618a42

View file

@ -104,7 +104,7 @@ class BatchOperation < ApplicationRecord
# beware, must be reloaded first
def called_for_last_time?(dossier_to_ignore)
dossiers.where.not(id: dossier_to_ignore.id).count.zero?
dossiers.where.not(id: dossier_to_ignore.id).empty?
end
def total_count