From 19cc8f415d19a1a8719ac1c674ee773f06067b44 Mon Sep 17 00:00:00 2001 From: Caillou <6117264+JeSuisUnCaillou@users.noreply.github.com> Date: Wed, 15 Jan 2025 16:48:28 +0100 Subject: [PATCH] improve subtitle of authorization --- app/models/authorization.rb | 4 ++-- .../authorization_request_forms/build/_header.html.erb | 6 +++--- features/instructeurs/consultation_habilitation.feature | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/models/authorization.rb b/app/models/authorization.rb index 8e7187e4d..cdb44c1dd 100644 --- a/app/models/authorization.rb +++ b/app/models/authorization.rb @@ -22,7 +22,7 @@ class Authorization < ApplicationRecord inverse_of: :authorization, dependent: :destroy - has_many :authorization_request_event, + has_many :authorization_request_events, as: :entity, dependent: :nullify @@ -69,7 +69,7 @@ def definition end def approving_instructor - authorization_request_event + authorization_request_events .where(name: 'approve') .order(created_at: :desc) .first diff --git a/app/views/authorization_request_forms/build/_header.html.erb b/app/views/authorization_request_forms/build/_header.html.erb index 1dc17c9ef..805bb5e81 100644 --- a/app/views/authorization_request_forms/build/_header.html.erb +++ b/app/views/authorization_request_forms/build/_header.html.erb @@ -32,12 +32,12 @@ <% if @authorization && policy([:instruction, @authorization_request]).show? %>