summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorJarka Kadlecová <jarka@gitlab.com>2018-02-13 13:41:35 +0100
committerJarka Kadlecová <jarka@gitlab.com>2018-02-13 18:44:30 +0100
commit8774c861760c221e3eda9f795b7e3b67c7f6631d (patch)
treeb6730398a34a85f2a9bec151f4252ddcd93305a9 /app/models/commit.rb
parentbf5e617a10e8df48ff78442f42f2cd6e47f59072 (diff)
downloadgitlab-ce-42934-search-api-fix.tar.gz
API - Include project in commits&blobs search results42934-search-api-fix
Diffstat (limited to 'app/models/commit.rb')
-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