Commit 12c3962fc0741f4976688a9a15c5865b23414181
1 parent
0a4283b5
Exists in
spb-stable
and in
3 other branches
Search within project.
Showing
1 changed file
with
5 additions
and
3 deletions
Show diff stats
app/controllers/projects_controller.rb
... | ... | @@ -136,7 +136,7 @@ class ProjectsController < ApplicationController |
136 | 136 | emojis: Emoji.names.map { |e| { name: e, path: view_context.image_url("emoji/#{e}.png") } }, |
137 | 137 | issues: @project.issues.select([:iid, :title, :description]), |
138 | 138 | mergerequests: @project.merge_requests.select([:iid, :title, :description]), |
139 | - members: participants | |
139 | + members: participants.uniq | |
140 | 140 | } |
141 | 141 | |
142 | 142 | respond_to do |format| |
... | ... | @@ -174,8 +174,10 @@ class ProjectsController < ApplicationController |
174 | 174 | |
175 | 175 | def participants_in(type, id) |
176 | 176 | users = case type |
177 | - when "Issue", "MergeRequest" | |
178 | - type.constantize.find_by_iid(id).participants | |
177 | + when "Issue" | |
178 | + @project.issues.find_by_iid(id).participants | |
179 | + when "MergeRequest" | |
180 | + @project.merge_requests.find_by_iid(id).participants | |
179 | 181 | when "Commit" |
180 | 182 | author_ids = Note.for_commit_id(id).pluck(:author_id).uniq |
181 | 183 | User.where(id: author_ids) | ... | ... |