summaryrefslogtreecommitdiff
path: root/app/controllers/search_controller.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-05-14 20:25:16 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-05-14 20:25:16 +0300
commit9d9b78823d151970fd784b995da2be1a5155b581 (patch)
treec0f85dd35fac0419ecb9863577ae79c127cb3d59 /app/controllers/search_controller.rb
parent46daf01a155b68fb1cda270881aa1f6c8307e830 (diff)
downloadgitlab-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.rb3
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