From 6d1fbc5af4c68564e60dab018b7a99618b95fb5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=B6hm?= Date: Thu, 5 Sep 2024 12:31:54 +0200 Subject: [PATCH] Renamed helper function or tab selector --- app/helpers/application_helper.rb | 12 ++++++------ app/views/layouts/_header.html.erb | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index c98fbe2..d37828c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -18,19 +18,19 @@ module ApplicationHelper end end - def operator? + def operator_tab? controller.class.name.split("::").first=="Operator" end - def admin? + def admin_tab? controller.class.name.split("::").first=="Admin" end + def profile_tab? + controller_name=="profiles" + end + def is_admin_or_operator? current_user.admin? || current_user.operator? end - - def profile? - controller_name=="profiles" - end end diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 879f1bb..b59332a 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -4,17 +4,17 @@