diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-09-24 07:32:29 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-09-24 07:32:29 +0000 |
commit | a58c6e9a9561ffbb3d16a3a9a45bd90a34735b50 (patch) | |
tree | 337d55fce3c4a66ced6215d05cab3cb09f15c48e /app/models | |
parent | 68cb24c4393b2c4e40700ba05039ed1412adcd64 (diff) | |
parent | 4bc1e040d4b7d73bd7afb3dbb95c87983eef2b04 (diff) | |
download | gitlab-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.rb | 1 |
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' |