From d71318ae9244da9e9113c9ef5180bd34674d0c89 Mon Sep 17 00:00:00 2001 From: Arnaud Levy <contact@arnaudlevy.com> Date: Fri, 11 Feb 2022 16:08:26 +0100 Subject: [PATCH] fix --- app/models/communication/website/menu/item.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/communication/website/menu/item.rb b/app/models/communication/website/menu/item.rb index 23c54a029..d95a6563b 100644 --- a/app/models/communication/website/menu/item.rb +++ b/app/models/communication/website/menu/item.rb @@ -83,8 +83,9 @@ class Communication::Website::Menu::Item < ApplicationRecord return nil unless active # Les mĆ©thodes target_for_ sont dĆ©finies dans le concern WithTarget method = "target_for_#{kind}" - target = respond_to?(method) ? send(method) - : about&.path + # Le true sert Ć examiner les mĆ©thodes protected + target = respond_to?(method, true) ? send(method) + : about&.path return nil if target.nil? target.end_with?('/') ? target : "#{target}/" -- GitLab