summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-15 18:59:01 +0200
committerDouwe Maan <douwe@gitlab.com>2015-04-15 18:59:01 +0200
commita9b04c4536ef55072f8ff763e85a30099941a1c6 (patch)
tree1655b26601456a854e5ecac341af358647839b02
parentc644dd01a41714bba7b77a3f5aa7997e6eee15fd (diff)
downloadgitlab-ce-a9b04c4536ef55072f8ff763e85a30099941a1c6.tar.gz
Fix Snippet#participants.
-rw-r--r--app/models/commit.rb1
-rw-r--r--app/models/concerns/issuable.rb1
-rw-r--r--app/models/snippet.rb2
3 files changed, 4 insertions, 0 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index f54696c378c..6677dcb1e34 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -138,6 +138,7 @@ class Commit
users = []
users << author
users << committer
+
mentions = []
mentions << self.mentioned_users(current_user, project)
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb
index 478134dff68..1cad5894267 100644
--- a/app/models/concerns/issuable.rb
+++ b/app/models/concerns/issuable.rb
@@ -122,6 +122,7 @@ module Issuable
users = []
users << author
users << assignee if is_assigned?
+
mentions = []
mentions << self.mentioned_users(current_user)
diff --git a/app/models/snippet.rb b/app/models/snippet.rb
index c53d2a8d603..13703f4115f 100644
--- a/app/models/snippet.rb
+++ b/app/models/snippet.rb
@@ -91,6 +91,8 @@ class Snippet < ActiveRecord::Base
users = []
users << author
+ mentions = []
+
notes.each do |note|
users << note.author
mentions << note.mentioned_users(current_user)