summaryrefslogtreecommitdiff
path: root/app/helpers/search_helper.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-05 20:37:35 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-05 20:37:35 +0300
commit0fdce4a52b1a9ba9e0efd98f00e558e4f07daeb5 (patch)
tree9305a29f92c3d6763d6b7038ac65a71ec67e087e /app/helpers/search_helper.rb
parent4ca6ebf017e93686ee885ee1a28dc5c6934c9d39 (diff)
downloadgitlab-ce-0fdce4a52b1a9ba9e0efd98f00e558e4f07daeb5.tar.gz
Refactor some search scopes to prevent wierd behaviour and PG::Error issues
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers/search_helper.rb')
-rw-r--r--app/helpers/search_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index 01c31205695..a4471507da8 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -81,7 +81,7 @@ module SearchHelper
# Autocomplete results for the current user's projects
def projects_autocomplete(term, limit = 5)
- Project.accessible_to(current_user).search_by_title(term).non_archived.limit(limit).map do |p|
+ ProjectsFinder.new.execute(current_user).search_by_title(term).non_archived.limit(limit).map do |p|
{
label: "project: #{search_result_sanitize(p.name_with_namespace)}",
url: project_path(p)