summaryrefslogtreecommitdiff
path: root/app/controllers/projects_controller.rb
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-03-25 09:25:31 +0100
committerMarin Jankovski <marin@gitlab.com>2014-03-25 18:53:09 +0100
commit01ec6c793c533306365319e3bf01174a976352d0 (patch)
treecba96e44b1eef60597fc2a228ec7640cef72e2fe /app/controllers/projects_controller.rb
parent81527e9fba64a276d58e17074721668bd213f57c (diff)
downloadgitlab-ce-01ec6c793c533306365319e3bf01174a976352d0.tar.gz
At mention participating users.
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r--app/controllers/projects_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index e181a0ec7fa..aac9fcd555c 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -123,11 +123,12 @@ class ProjectsController < ApplicationController
end
def autocomplete_sources
+ participating_users = @project.team.members.sort_by(&:username).map { |user| { username: user.username, name: user.name } } + User.participating(@project.notes).select([:username, :name]).sort_by(&:username).map { |user| { username: user.username, name: user.name } }
@suggestions = {
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: @project.team.members.sort_by(&:username).map { |user| { username: user.username, name: user.name } }
+ members: participating_users.uniq
}
respond_to do |format|