diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-08-24 21:29:51 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-08-24 21:29:51 +0100 |
commit | 349764beee84d45da26703fd07f325815beb8c7f (patch) | |
tree | 8a911ada4a96e93199f331c94dd41bc55c3d320e /app | |
parent | b0dc7c0bd80994a4d4b9397e1b3028cde4de8784 (diff) | |
download | gitlab-ci-349764beee84d45da26703fd07f325815beb8c7f.tar.gz |
Order commits by committed_at and id
This needs to be done that way, because the committed_at can be null for some pretty old commits.
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 4879f24..f0cf3a5 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -28,7 +28,7 @@ class Project < ActiveRecord::Base include ProjectStatus - has_many :commits, ->() { order(:committed_at) }, dependent: :destroy + has_many :commits, ->() { order(:committed_at, :id) }, dependent: :destroy has_many :builds, through: :commits, dependent: :destroy has_many :runner_projects, dependent: :destroy has_many :runners, through: :runner_projects |