diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-14 20:25:16 +0300 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-14 20:25:16 +0300 |
| commit | 9d9b78823d151970fd784b995da2be1a5155b581 (patch) | |
| tree | c0f85dd35fac0419ecb9863577ae79c127cb3d59 /app/controllers/search_controller.rb | |
| parent | 46daf01a155b68fb1cda270881aa1f6c8307e830 (diff) | |
| download | gitlab-ce-9d9b78823d151970fd784b995da2be1a5155b581.tar.gz | |
Fix paginate of blobs, fixed preserve in dev mode for blob results
Diffstat (limited to 'app/controllers/search_controller.rb')
| -rw-r--r-- | app/controllers/search_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 0a92d647a13..f5c3bb133ed 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -20,6 +20,7 @@ class SearchController < ApplicationController @merge_requests = result[:merge_requests] @issues = result[:issues] @wiki_pages = result[:wiki_pages] - @blobs = result[:blobs] + @blobs = Kaminari.paginate_array(result[:blobs]).page(params[:page]).per(20) + @total_results = @projects.count + @merge_requests.count + @issues.count + @wiki_pages.count + @blobs.total_count end end |
