summaryrefslogtreecommitdiff
path: root/app/controllers/search_controller.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-05-09 11:46:32 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-05-09 11:47:09 +0300
commit6e1ee1fea6400c3621005f1b79e1b8dab43cd000 (patch)
tree73cf78caa2e2eb31ff2003b4c2f3285b54c7aac3 /app/controllers/search_controller.rb
parentf1126f494cf4fb2b27c43ac3d3bd69fea9c4afe4 (diff)
downloadgitlab-ce-6e1ee1fea6400c3621005f1b79e1b8dab43cd000.tar.gz
made some ui enhancement for search page
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 73e46c5021d..132658c5771 100644
--- a/app/controllers/search_controller.rb
+++ b/app/controllers/search_controller.rb
@@ -6,7 +6,8 @@ class SearchController < ApplicationController
project_ids = current_user.authorized_projects.map(&:id)
if group_id.present?
- group_project_ids = Group.find(group_id).projects.map(&:id)
+ @group = Group.find(group_id)
+ group_project_ids = @group.projects.map(&:id)
project_ids.select! { |id| group_project_ids.include?(id)}
elsif project_id.present?
project_ids.select! { |id| id == project_id.to_i}