diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-05-28 17:59:19 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-06-03 16:35:57 +0300 |
commit | 2999c8b41f8272b239e4364867012c9e3d4a997a (patch) | |
tree | ea3fca536ea22c25e5ea57c11bdbc2a56da2c8fe /app/models/commit.rb | |
parent | 17a8fe8a9011cfde0a9dbe70d726c769819a9dfd (diff) | |
download | gitlab-ci-2999c8b41f8272b239e4364867012c9e3d4a997a.tar.gz |
cleaning up
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 4657564..b9a5100 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -15,7 +15,6 @@ class Commit < ActiveRecord::Base belongs_to :project has_many :builds, dependent: :destroy - has_many :jobs, through: :builds serialize :push_data @@ -102,7 +101,7 @@ class Commit < ActiveRecord::Base @builds_without_retry ||= begin grouped_builds = builds.group_by(&:name) - grouped_builds.map do |job, builds| + grouped_builds.map do |name, builds| builds.sort_by(&:id).last end end |