Skip to content

Commit

Permalink
Merge pull request #6182 from JiyaGupta-cs/fix-active-nav-for-subroutes
Browse files Browse the repository at this point in the history
[Fix]: Active Navigation Tab for Sub-Routes
  • Loading branch information
ragesoss authored Feb 7, 2025
2 parents 654b951 + 558237e commit db7ad82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/surveys_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def survey_notification_id(notification)
def survey_class_for_path(req, path)
current_path_segments = req.path.split('/').reject(&:blank?)
active_path = path.split('/').reject(&:blank?).last
current_path_segments.last == active_path ? 'active' : nil
current_path_segments.include?(active_path) ? 'active' : nil
end

######################
Expand Down

0 comments on commit db7ad82

Please sign in to comment.