Split commit_id and noteable_id for Note
This commit is contained in:
parent
aa8d4d9fea
commit
9ada678819
11 changed files with 54 additions and 28 deletions
|
@ -204,7 +204,7 @@ class MergeRequest < ActiveRecord::Base
|
|||
|
||||
def mr_and_commit_notes
|
||||
commit_ids = commits.map(&:id)
|
||||
Note.where("(noteable_type = 'MergeRequest' AND noteable_id = :mr_id) OR (noteable_type = 'Commit' AND noteable_id IN (:commit_ids))", mr_id: id, commit_ids: commit_ids)
|
||||
Note.where("(noteable_type = 'MergeRequest' AND noteable_id = :mr_id) OR (noteable_type = 'Commit' AND commit_id IN (:commit_ids))", mr_id: id, commit_ids: commit_ids)
|
||||
end
|
||||
|
||||
# Returns the raw diff for this merge request
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue