extract procedure_id
This commit is contained in:
parent
dd2a1e6426
commit
46517e997b
1 changed files with 6 additions and 2 deletions
|
@ -245,8 +245,12 @@ module Instructeurs
|
||||||
@statut ||= (params[:statut].presence || 'a-suivre')
|
@statut ||= (params[:statut].presence || 'a-suivre')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def procedure_id
|
||||||
|
params[:procedure_id]
|
||||||
|
end
|
||||||
|
|
||||||
def procedure
|
def procedure
|
||||||
Procedure.find(params[:procedure_id])
|
Procedure.find(procedure_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def ensure_ownership!
|
def ensure_ownership!
|
||||||
|
@ -267,7 +271,7 @@ module Instructeurs
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_procedure_presentation
|
def get_procedure_presentation
|
||||||
procedure_presentation, errors = current_instructeur.procedure_presentation_and_errors_for_procedure_id(params[:procedure_id])
|
procedure_presentation, errors = current_instructeur.procedure_presentation_and_errors_for_procedure_id(procedure_id)
|
||||||
if errors.present?
|
if errors.present?
|
||||||
flash[:alert] = "Votre affichage a dû être réinitialisé en raison du problème suivant : " + errors.full_messages.join(', ')
|
flash[:alert] = "Votre affichage a dû être réinitialisé en raison du problème suivant : " + errors.full_messages.join(', ')
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue