Merge pull request #3169 from betagouv/harmonize-purge-routes

Harmonize user champ pj purge route to gestionnaire
This commit is contained in:
gregoirenovel 2018-12-15 07:34:40 +01:00 committed by GitHub
commit ce5e6e5c8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -16,7 +16,7 @@
- if champ.private?
= link_to 'supprimer', gestionnaire_champ_purge_champ_piece_justificative_path(procedure_id: champ.dossier.procedure_id, dossier_id: champ.dossier_id, champ_id: champ.id), remote: true, method: :delete
- else
= link_to 'supprimer', purge_champ_piece_justificative_dossier_path(champ_id: champ.id), remote: true, method: :delete
= link_to 'supprimer', champ_purge_champ_piece_justificative_path(id: champ.dossier_id, champ_id: champ.id), remote: true, method: :delete
%br
Modifier :
= form.file_field :piece_justificative_file,

View file

@ -284,7 +284,10 @@ Rails.application.routes.draw do
post 'commentaire' => 'dossiers#create_commentaire'
post 'ask_deletion'
get 'attestation'
delete 'purge_champ_piece_justificative'
resources :champs, only: [] do
delete 'purge_champ_piece_justificative' => 'dossiers#purge_champ_piece_justificative'
end
end
collection do