Commit eb2022fe authored by Pavel Shutsin's avatar Pavel Shutsin

Merge branch 'tnir/rubocop-Rails/Presence' into 'master'

Enable Rails/Presence in Rubocop for HAML

See merge request gitlab-org/gitlab!59600
parents 2c785678 374c853f
......@@ -124,7 +124,6 @@ linters:
- Performance/RedundantMatch
- Performance/StringReplacement
- Rails/LinkToBlank
- Rails/Presence
- Rails/RequestReferer
- Style/ColonMethodCall
- Style/ConditionalAssignment
......
......@@ -5,9 +5,8 @@
= form_tag admin_groups_path, method: :get, class: 'js-search-form' do |f|
= hidden_field_tag :sort, @sort
.search-holder
- project_name = params[:name].present? ? params[:name] : nil
.search-field-holder
= search_field_tag :name, project_name, class: "form-control search-text-input js-search-input", autofocus: true, spellcheck: false, placeholder: 'Search by name', data: { qa_selector: 'group_search_field' }
= search_field_tag :name, params[:name].presence, class: "form-control search-text-input js-search-input", autofocus: true, spellcheck: false, placeholder: 'Search by name', data: { qa_selector: 'group_search_field' }
= sprite_icon('search', css_class: 'search-icon')
= render "shared/groups/dropdown", options_hash: admin_groups_sort_options_hash
= link_to new_admin_group_path, class: "gl-button btn btn-confirm" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment