diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-05 21:37:35 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-05 21:37:35 +0400 |
commit | 0fdce4a52b1a9ba9e0efd98f00e558e4f07daeb5 (patch) | |
tree | 9305a29f92c3d6763d6b7038ac65a71ec67e087e /app/helpers | |
parent | 4ca6ebf017e93686ee885ee1a28dc5c6934c9d39 (diff) |
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')
-rw-r--r-- | app/helpers/search_helper.rb | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | app/helpers/submodule_helper.rb | 0 |
2 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) diff --git a/app/helpers/submodule_helper.rb b/app/helpers/submodule_helper.rb index 09e5c08e621..09e5c08e621 100755..100644 --- a/app/helpers/submodule_helper.rb +++ b/app/helpers/submodule_helper.rb |