diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-02-04 13:10:31 +0100 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-02-04 13:10:31 +0100 |
commit | 2d9d2e7a7cef552159f7ee9fa84198a1d52f317f (patch) | |
tree | 7dea71bce833c8cdd57fc3bce900b33c382329a1 /app | |
parent | b5befc734be55a4a7a07519baf03e0ba29c0f8c5 (diff) | |
parent | 70e44d63f7f1af81ddb0527e3a084c6ab692ea58 (diff) | |
download | gitlab-ce-2d9d2e7a7cef552159f7ee9fa84198a1d52f317f.tar.gz |
Merge branch 'better-search-autocomplete'
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/search_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index d4f78258626..1eb790b1796 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -70,7 +70,7 @@ module SearchHelper # Autocomplete results for the current user's groups def groups_autocomplete(term, limit = 5) - Group.search(term).limit(limit).map do |group| + current_user.authorized_groups.search(term).limit(limit).map do |group| { label: "group: #{search_result_sanitize(group.name)}", url: group_path(group) @@ -80,7 +80,7 @@ module SearchHelper # Autocomplete results for the current user's projects def projects_autocomplete(term, limit = 5) - ProjectsFinder.new.execute(current_user).search_by_title(term). + current_user.authorized_projects.search_by_title(term). sorted_by_stars.non_archived.limit(limit).map do |p| { label: "project: #{search_result_sanitize(p.name_with_namespace)}", |