diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-14 21:11:48 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-14 21:11:48 +0400 |
commit | 46daf01a155b68fb1cda270881aa1f6c8307e830 (patch) | |
tree | cce4c62204d482a19df542c55af199f0fd1a3eae /app/controllers/search_controller.rb | |
parent | 634cbd71380f595f6f44ce93399b92fbee37f98f (diff) |
Search for blobs by default inside project. Added pagination for blobs search
Diffstat (limited to 'app/controllers/search_controller.rb')
-rw-r--r-- | app/controllers/search_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 132658c5771..0a92d647a13 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -10,13 +10,13 @@ class SearchController < ApplicationController group_project_ids = @group.projects.map(&:id) project_ids.select! { |id| group_project_ids.include?(id)} elsif project_id.present? + @project = Project.find(params[:project_id]) project_ids.select! { |id| id == project_id.to_i} end result = SearchContext.new(project_ids, params).execute @projects = result[:projects] - @project = result[:project] @merge_requests = result[:merge_requests] @issues = result[:issues] @wiki_pages = result[:wiki_pages] |