summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-09-24 07:32:29 +0000
committerDouwe Maan <douwe@gitlab.com>2015-09-24 07:32:29 +0000
commita58c6e9a9561ffbb3d16a3a9a45bd90a34735b50 (patch)
tree337d55fce3c4a66ced6215d05cab3cb09f15c48e /app/models
parent68cb24c4393b2c4e40700ba05039ed1412adcd64 (diff)
parent4bc1e040d4b7d73bd7afb3dbb95c87983eef2b04 (diff)
downloadgitlab-ce-a58c6e9a9561ffbb3d16a3a9a45bd90a34735b50.tar.gz
Merge branch 'cleanup-ci-dashboard' into 'master'
Cleanup ci dashboard Part of #2594. Based on !1403 * remove rendering GitLab projects with not enabled CI on CI dashboard * remove enabling CI for projects from CI dashboard (now its done by simply pushing `.gitlab-ci.yml`) * simplify the projects query for CI dashboard See merge request !1405
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ci/project.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/ci/project.rb b/app/models/ci/project.rb
index 37fbcc287bb..a52e28615f7 100644
--- a/app/models/ci/project.rb
+++ b/app/models/ci/project.rb
@@ -41,6 +41,7 @@ module Ci
has_many :events, dependent: :destroy, class_name: 'Ci::Event'
has_many :variables, dependent: :destroy, class_name: 'Ci::Variable'
has_many :triggers, dependent: :destroy, class_name: 'Ci::Trigger'
+ has_one :last_commit, -> { order 'ci_commits.created_at DESC' }, class_name: 'Ci::Commit'
# Project services
has_many :services, dependent: :destroy, class_name: 'Ci::Service'