From 9ada67881970b05d4be49cbe329b4bf50ffe4f77 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 18 Dec 2012 20:02:00 +0200 Subject: Split commit_id and noteable_id for Note --- app/models/merge_request.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/merge_request.rb') diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 2409fb80acb..052e0850d96 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -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 -- cgit v1.2.1