summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb17
1 files changed, 2 insertions, 15 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 1985793c600..be5a118bfec 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -3,8 +3,10 @@ class Commit
include StaticModel
extend ActiveModel::Naming
include Mentionable
+ include Participable
attr_mentionable :safe_message
+ participant :author, :committer, :notes, :mentioned_users
attr_accessor :project
@@ -137,21 +139,6 @@ class Commit
User.find_for_commit(committer_email, committer_name)
end
- def participants(current_user = nil)
- users = []
- users << author
- users << committer
-
- users.push *self.mentioned_users(current_user)
-
- notes.each do |note|
- users << note.author
- users.push *note.mentioned_users(current_user)
- end
-
- users.uniq
- end
-
def notes
project.notes.for_commit_id(self.id)
end