Skip to content
Snippets Groups Projects
Commit d71318ae authored by Arnaud Levy's avatar Arnaud Levy
Browse files

fix

parent 941d8221
No related branches found
No related tags found
No related merge requests found
......@@ -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}/"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment