diff options
author | Marin Jankovski <marin@gitlab.com> | 2014-03-25 14:00:43 +0100 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-03-25 18:53:09 +0100 |
commit | 12c3962fc0741f4976688a9a15c5865b23414181 (patch) | |
tree | 8ae24fe441019d5135599ad1ea7ee15bd467cf4e | |
parent | 0a4283b50adb10c13cf2f00c83e372549a004a05 (diff) | |
download | gitlab-ce-12c3962fc0741f4976688a9a15c5865b23414181.tar.gz |
Search within project.
-rw-r--r-- | app/controllers/projects_controller.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 30196f9da3a..4afcedf3361 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -136,7 +136,7 @@ class ProjectsController < ApplicationController emojis: Emoji.names.map { |e| { name: e, path: view_context.image_url("emoji/#{e}.png") } }, issues: @project.issues.select([:iid, :title, :description]), mergerequests: @project.merge_requests.select([:iid, :title, :description]), - members: participants + members: participants.uniq } respond_to do |format| @@ -174,8 +174,10 @@ class ProjectsController < ApplicationController def participants_in(type, id) users = case type - when "Issue", "MergeRequest" - type.constantize.find_by_iid(id).participants + when "Issue" + @project.issues.find_by_iid(id).participants + when "MergeRequest" + @project.merge_requests.find_by_iid(id).participants when "Commit" author_ids = Note.for_commit_id(id).pluck(:author_id).uniq User.where(id: author_ids) |