diff --git a/app/models/communication/website/menu/item.rb b/app/models/communication/website/menu/item.rb index 23c54a029f65943d85ee1c644187db99ccd81370..d95a6563bdbd9b97618bb1d37934c2f0d2521df3 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}/"