diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-12-09 18:26:43 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-12-09 18:26:43 +0400 |
commit | 954dd3986184d4c8c6886e97ba11c0c333c01ebb (patch) | |
tree | 31f96cc84edb88a5acb79f25292a84fd0f887319 /app/helpers/search_helper.rb | |
parent | c0f6a932b9277a49232348029198f3094276a84b (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/helpers/search_helper.rb')
-rw-r--r-- | app/helpers/search_helper.rb | 4 |
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 |