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 @@