Merge pull request #8925 from tchak/fix-procedire-remove-duplicate-code
chore(procedure): remove duplicate code
This commit is contained in:
commit
de858243c0
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