chore(sentry): set procedure tag to administrateur controller

This commit is contained in:
Colin Darie 2023-02-07 10:38:44 +01:00
parent 0958053c72
commit 786c3d06d6

View file

@ -7,6 +7,10 @@ module Administrateurs
id = params[:procedure_id] || params[:id]
@procedure = current_administrateur.procedures.find(id)
Sentry.configure_scope do |scope|
scope.set_tags(procedure: @procedure.id)
end
rescue ActiveRecord::RecordNotFound
flash.alert = 'Démarche inexistante'
redirect_to admin_procedures_path, status: 404