diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2019-06-24 15:04:07 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2019-06-24 16:44:04 +0300 |
commit | f928c22ff0952cd6a358ae0102aa45c58c2478aa (patch) | |
tree | 6783b5b5a2a05a1b40a61b0057451c445cccf1b2 /app/finders | |
parent | 88c8d177f835983a0a47796529906c69376d159d (diff) | |
download | gitlab-ce-f928c22ff0952cd6a358ae0102aa45c58c2478aa.tar.gz |
Return all runner tags when search is empty63656-runner-tags-search-dropdown-is-empty
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/autocomplete/acts_as_taggable_on/tags_finder.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/finders/autocomplete/acts_as_taggable_on/tags_finder.rb b/app/finders/autocomplete/acts_as_taggable_on/tags_finder.rb index f38c187799c..78a17312e26 100644 --- a/app/finders/autocomplete/acts_as_taggable_on/tags_finder.rb +++ b/app/finders/autocomplete/acts_as_taggable_on/tags_finder.rb @@ -22,8 +22,7 @@ module Autocomplete end def filter_by_name(tags) - return tags unless search - return tags.none if search.empty? + return tags unless search.present? if search.length >= Gitlab::SQL::Pattern::MIN_CHARS_FOR_PARTIAL_MATCHING tags.named_like(search) |