destroys not all dossiers

but only dossiers for a specific user
This commit is contained in:
Christophe Robillard 2020-01-30 11:18:01 +01:00
parent cee4c5b8fb
commit 6fc8a27bd7
2 changed files with 11 additions and 1 deletions

View file

@ -108,7 +108,7 @@ class User < ApplicationRecord
dossiers.each do |dossier|
dossier.delete_and_keep_track(administration)
end
dossiers.unscoped.destroy_all
dossiers.with_hidden.destroy_all
destroy!
end