Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-09 18:26:43 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-09 18:26:43 +0400
commit954dd3986184d4c8c6886e97ba11c0c333c01ebb (patch)
tree31f96cc84edb88a5acb79f25292a84fd0f887319 /app
parentc0f6a932b9277a49232348029198f3094276a84b (diff)
Remove duplicate items from search autocomplete
Old behaviour gave you duplicate entries if your project is public Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r--app/helpers/search_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index 8ff0bc67b71..109acfd192b 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -8,7 +8,9 @@ module SearchHelper
default_autocomplete,
project_autocomplete,
help_autocomplete
- ].flatten.to_json
+ ].flatten.uniq do |item|
+ item[:label]
+ end.to_json
end
private