Skip to content

Commit

Permalink
fix: active navigation tab for sub routes
Browse files Browse the repository at this point in the history
  • Loading branch information
JiyaGupta-cs committed Feb 7, 2025
1 parent 654b951 commit 558237e
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 558237e

Please sign in to comment.