Use `next` keyword in field loop in admin/accounts/index view (#27559)

shrike
Matt Jankowski 2023-10-26 06:52:14 -04:00 committed by GitHub
parent 400f5c9174
commit 3ca974e101
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -16,6 +16,5 @@ linters:
exclude: exclude:
- 'app/views/admin/accounts/_buttons.html.haml' - 'app/views/admin/accounts/_buttons.html.haml'
- 'app/views/admin/accounts/_local_account.html.haml' - 'app/views/admin/accounts/_local_account.html.haml'
- 'app/views/admin/accounts/index.html.haml'
- 'app/views/admin/roles/_form.html.haml' - 'app/views/admin/roles/_form.html.haml'
- 'app/views/layouts/application.html.haml' - 'app/views/layouts/application.html.haml'

View File

@ -22,7 +22,8 @@
.fields-group .fields-group
- %i(username by_domain display_name email ip).each do |key| - %i(username by_domain display_name email ip).each do |key|
- unless key == :by_domain && params[:origin] != 'remote' - next if key == :by_domain && params[:origin] != 'remote'
.input.string.optional .input.string.optional
= text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.accounts.#{key}") = text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.accounts.#{key}")