Change dossier.find on destroy draft fonction
This commit is contained in:
parent
c6f5a8b62d
commit
d698e95797
1 changed files with 1 additions and 1 deletions
|
@ -132,7 +132,7 @@ class Users::DossiersController < UsersController
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
dossier = Dossier.find(params[:id])
|
dossier = current_user.dossiers.find(params[:id])
|
||||||
if dossier.brouillon?
|
if dossier.brouillon?
|
||||||
dossier.destroy
|
dossier.destroy
|
||||||
flash.notice = 'Brouillon supprimé'
|
flash.notice = 'Brouillon supprimé'
|
||||||
|
|
Loading…
Reference in a new issue