Class: Review

Inherits:
ApplicationRecord show all
Includes:
Mentionable, Participable
Defined in:
app/models/review.rb

Instance Method Summary collapse

Methods included from Mentionable

#create_cross_references!, #create_new_cross_references!, #directly_addressed_users, #extractors, #gfm_reference, #local_reference, #matches_cross_reference_regex?, #mentioned_users, #referenced_group_users, #referenced_groups, #referenced_mentionables, #referenced_project_users, #referenced_projects, #referenced_users, #store_mentions!

Methods included from Participable

#participants

Methods inherited from ApplicationRecord

at_most, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, underscore, without_order

Instance Method Details

#all_references(current_user = nil, extractor: nil) ⇒ Object


17
18
19
20
21
22
23
24
25
# File 'app/models/review.rb', line 17

def all_references(current_user = nil, extractor: nil)
  ext = super

  notes.each do |note|
    note.all_references(current_user, extractor: ext)
  end

  ext
end

#user_mentionsObject


27
28
29
# File 'app/models/review.rb', line 27

def user_mentions
  merge_request.user_mentions.where.not(note_id: nil)
end