Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-02-14 13:15:49 +0300
committerMark Fletcher <mark@gitlab.com>2018-02-14 14:50:47 +0300
commitf3af06526ad64e653183e4ffd0ea3bbdef5b1bda (patch)
tree20150d7ccea6d7fc61fed983e478e965bf0da332 /app
parented6fd101ffe1230c9f4110950e5de2b8800ce9ba (diff)
Merge branch '42934-search-api-fix' into 'master'
Add information about projects when searching in wiki_blobs, blobs, commits scopes Closes #42934 See merge request gitlab-org/gitlab-ce!17095
Diffstat (limited to 'app')
-rw-r--r--app/models/commit.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 2d2d89af030..8c960389652 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -116,6 +116,10 @@ class Commit
raw.id
end
+ def project_id
+ project.id
+ end
+
def ==(other)
other.is_a?(self.class) && raw == other.raw
end