remove ununcessary instance variable for current admin

This commit is contained in:
Lisa Durand 2024-03-20 11:24:24 +01:00
parent e757eefd37
commit db244c821b
2 changed files with 1 additions and 2 deletions

View file

@ -286,7 +286,6 @@ module Administrateurs
def check_path
@path_available = @procedure.path_available?(params[:path])
@other_procedure = @procedure.other_procedure_with_path(params[:path])
@administrateur = current_administrateur
respond_to do |format|
format.turbo_stream do
render :check_path

View file

@ -1,5 +1,5 @@
= turbo_stream.update 'check_path' do
- if @path_available == false && @administrateur.owns?(@other_procedure)
- if @path_available == false && current_administrateur.owns?(@other_procedure)
%p.fr-error-text= t('.path_not_available.owner')
- elsif @path_available == false
%p.fr-error-text= t('.path_not_available.not_owner')