From c13fef82be76ed776b84d1fee7e0a01cbfa4a3c8 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Mon, 25 Apr 2022 15:18:12 +0100 Subject: [PATCH] Compare partial URLs to highlight navigation items (#493) * Compare partial URLs to highlight navigation items * fix tests * Extract method and add tests --- .../primary_navigation_component.html.erb | 2 +- app/components/primary_navigation_component.rb | 4 ++++ app/views/layouts/application.html.erb | 12 ++++++------ .../primary_navigation_component_spec.rb | 16 +++++++++++++--- 4 files changed, 24 insertions(+), 10 deletions(-) diff --git a/app/components/primary_navigation_component.html.erb b/app/components/primary_navigation_component.html.erb index a0750d712..0bccaaf81 100644 --- a/app/components/primary_navigation_component.html.erb +++ b/app/components/primary_navigation_component.html.erb @@ -2,7 +2,7 @@