Fix Style/HashEachMethods cop in HAML files (#28178)

This commit is contained in:
Claire 2023-12-04 10:09:43 +01:00 committed by GitHub
parent 9603198982
commit a2bcfeb887
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -27,7 +27,7 @@
%button.button= t('admin.accounts.search')
= link_to t('admin.accounts.reset'), admin_reports_path, class: 'button negative'
- @reports.group_by(&:target_account_id).each do |_target_account_id, reports|
- @reports.group_by(&:target_account_id).each_value do |reports|
- target_account = reports.first.target_account
.report-card
.report-card__profile

View file

@ -14,5 +14,5 @@
%label= t('activerecord.attributes.doorkeeper/application.scopes')
%span.hint= t('simple_form.hints.defaults.scopes')
- Doorkeeper.configuration.scopes.group_by { |s| s.split(':').first }.each do |_key, value|
- Doorkeeper.configuration.scopes.group_by { |s| s.split(':').first }.each_value do |value|
= f.input :scopes, label: false, hint: false, collection: value.sort, wrapper: :with_block_label, include_blank: false, label_method: ->(scope) { safe_join([content_tag(:samp, scope, class: class_for_scope(scope)), content_tag(:span, t("doorkeeper.scopes.#{scope}"), class: 'hint')]) }, selected: f.object.scopes.all, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'