Fix quote style in user privilege item partial

This commit is contained in:
Andreas Nedbal 2022-07-27 02:12:07 +02:00 committed by Andreas Nedbal
parent 76845a55c0
commit afa250af01
1 changed files with 3 additions and 3 deletions

View File

@ -1,12 +1,12 @@
:ruby
description ||= ''
role_mapping = { admin: 'administrator' }
description ||= ""
role_mapping = { admin: "administrator" }
requires_role = %w[admin moderator].include?(privilege)
checked = requires_role ? user.has_role?(role_mapping.fetch(privilege, privilege).to_sym) : user.public_send("#{privilege}?")
%li.list-group-item{ id: "privilege-#{privilege}" }
.media
.pull-left
%input{ type: :checkbox, name: 'check-your-privileges', data: { type: privilege, user: user.screen_name }, checked: checked, autocomplete: :off }
%input{ type: :checkbox, name: "check-your-privileges", data: { type: privilege, user: user.screen_name }, checked: checked, autocomplete: :off }
.media-body
.list-group-item-heading= privilege.capitalize
- unless description.blank?