From 6aca35ff462b1d90bd44f8748006540bc4f86a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=B6hm?= Date: Mon, 2 Sep 2024 11:39:03 +0200 Subject: [PATCH] Fixed profile selected state in navbar --- app/helpers/application_helper.rb | 4 ++++ app/views/layouts/_header.html.erb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 97a7b2d..498b8ed 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -25,4 +25,8 @@ module ApplicationHelper def admin? controller.class.name.split("::").first=="Admin" end + + def profile? + controller.class.name.split("::").first=="Profile" + end end diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 517b0c9..1a38a4c 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -4,7 +4,7 @@