chore(procedure): remove duplicate code
This commit is contained in:
parent
7bf31c6278
commit
8904516b85
2 changed files with 1 additions and 10 deletions
|
@ -219,7 +219,7 @@ module Administrateurs
|
|||
|
||||
def restore
|
||||
procedure = current_administrateur.procedures.with_discarded.discarded.find(params[:id])
|
||||
procedure.restore_procedure(current_administrateur)
|
||||
procedure.restore(current_administrateur)
|
||||
flash.notice = t('administrateurs.index.restored', procedure_id: procedure.id)
|
||||
redirect_to admin_procedures_path
|
||||
end
|
||||
|
|
|
@ -741,15 +741,6 @@ class Procedure < ApplicationRecord
|
|||
end
|
||||
end
|
||||
|
||||
def restore_procedure(author)
|
||||
if discarded?
|
||||
undiscard
|
||||
self.dossiers.hidden_by_administration.each do |dossier|
|
||||
dossier.restore(author)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def flipper_id
|
||||
"Procedure;#{id}"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue