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-14 09:00:26 +0100
commitb0b4ae1875529cd7ca786bd5eccd49be9a40a038 (patch)
treee431498a102e05c4371d5be4e2430b91df01cb16 /app/models/commit.rb
parentbf5e617a10e8df48ff78442f42f2cd6e47f59072 (diff)
downloadgitlab-ce-b0b4ae1875529cd7ca786bd5eccd49be9a40a038.tar.gz
API - Include project in commits&blobs search results
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