From cc3934b423c72bc04babcc7a512d1e62557cbf69 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 21 Aug 2022 15:12:12 +0200 Subject: [PATCH] Replace `has_role?` use in action partial with `admin?` --- app/views/actions/_answer.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/actions/_answer.haml b/app/views/actions/_answer.haml index 4a0ecf40..aea15c9b 100644 --- a/app/views/actions/_answer.haml +++ b/app/views/actions/_answer.haml @@ -16,7 +16,7 @@ %a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-report" } } %i.fa.fa-fw.fa-exclamation-triangle = t("voc.report") - - if current_user.has_role? :administrator + - if current_user.admin? %a.dropdown-item{ href: rails_admin_path_for_resource(answer), target: "_blank" } %i.fa.fa-fw.fa-gears = t("voc.view_in_rails_admin")