Replace `has_role?` use in action partial with `admin?`

This commit is contained in:
Andreas Nedbal 2022-08-21 15:12:12 +02:00
parent 656a9e8a86
commit cc3934b423
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@
%a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-report" } } %a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-report" } }
%i.fa.fa-fw.fa-exclamation-triangle %i.fa.fa-fw.fa-exclamation-triangle
= t("voc.report") = 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" } %a.dropdown-item{ href: rails_admin_path_for_resource(answer), target: "_blank" }
%i.fa.fa-fw.fa-gears %i.fa.fa-fw.fa-gears
= t("voc.view_in_rails_admin") = t("voc.view_in_rails_admin")