controller
This commit is contained in:
parent
0381444770
commit
3c5808fe03
1 changed files with 6 additions and 0 deletions
|
@ -216,9 +216,15 @@ module Administrateurs
|
|||
@procedure_lien_test = commencer_test_url(path: @procedure.path)
|
||||
@procedure.path = @procedure.suggested_path(current_administrateur)
|
||||
@current_administrateur = current_administrateur
|
||||
@closed_procedures = current_administrateur.procedures.with_discarded.closes.map { |p| ["#{p.libelle} (#{p.id})", p.id] }.to_h
|
||||
end
|
||||
|
||||
def publish
|
||||
if params[:old_procedure].present?
|
||||
old_procedure = current_administrateur.procedures.with_discarded.closes.find(params[:old_procedure])
|
||||
old_procedure.update!(replaced_by_procedure_id: @procedure.id)
|
||||
end
|
||||
|
||||
@procedure.assign_attributes(publish_params)
|
||||
|
||||
if @procedure.draft_changed?
|
||||
|
|
Loading…
Reference in a new issue