diff options
author | Valery Sizov <valery@gitlab.com> | 2016-09-06 10:12:55 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2016-09-06 10:12:55 +0300 |
commit | 03bed0fbd31b2edc9702ba690bae8c5fc53eb5e5 (patch) | |
tree | 128682cd19a6810b31ded67e7511ba7e54dc907f /lib | |
parent | ad599eb65c8ce483a7faaffe226ec7ce53da0f55 (diff) | |
download | gitlab-ce-03bed0fbd31b2edc9702ba690bae8c5fc53eb5e5.tar.gz |
Clean up search result classesclean_up_search_classes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/project_search_results.rb | 5 | ||||
-rw-r--r-- | lib/gitlab/search_results.rb | 9 | ||||
-rw-r--r-- | lib/gitlab/snippet_search_results.rb | 4 |
3 files changed, 0 insertions, 18 deletions
diff --git a/lib/gitlab/project_search_results.rb b/lib/gitlab/project_search_results.rb index 183bd10d6a3..5b9cfaeb2f8 100644 --- a/lib/gitlab/project_search_results.rb +++ b/lib/gitlab/project_search_results.rb @@ -28,11 +28,6 @@ module Gitlab end end - def total_count - @total_count ||= issues_count + merge_requests_count + blobs_count + - notes_count + wiki_blobs_count + commits_count - end - def blobs_count @blobs_count ||= blobs.count end diff --git a/lib/gitlab/search_results.rb b/lib/gitlab/search_results.rb index f8ab2b1f09e..2690938fe82 100644 --- a/lib/gitlab/search_results.rb +++ b/lib/gitlab/search_results.rb @@ -27,11 +27,6 @@ module Gitlab end end - def total_count - @total_count ||= projects_count + issues_count + merge_requests_count + - milestones_count - end - def projects_count @projects_count ||= projects.count end @@ -48,10 +43,6 @@ module Gitlab @milestones_count ||= milestones.count end - def empty? - total_count.zero? - end - private def projects diff --git a/lib/gitlab/snippet_search_results.rb b/lib/gitlab/snippet_search_results.rb index e0e74ff8359..9e01f02029c 100644 --- a/lib/gitlab/snippet_search_results.rb +++ b/lib/gitlab/snippet_search_results.rb @@ -20,10 +20,6 @@ module Gitlab end end - def total_count - @total_count ||= snippet_titles_count + snippet_blobs_count - end - def snippet_titles_count @snippet_titles_count ||= snippet_titles.count end |