diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-11-03 19:02:30 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-11-03 19:02:30 +0200 |
commit | d6fdd773b5907e654bcb8633c84227037c81bbd7 (patch) | |
tree | a66a6f6b6f6ccc27a5192f1943c2d401fe4b2f06 /app/models/commit.rb | |
parent | ada547589c8a66b936c8d197abee15994f7a1665 (diff) | |
download | gitlab-ci-d6fdd773b5907e654bcb8633c84227037c81bbd7.tar.gz |
Link build with job
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index bad8896..cb08c24 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -97,7 +97,10 @@ class Commit < ActiveRecord::Base def create_builds project.jobs.active.map do |job| - builds.create(commands: job.commands) + build = builds.new(commands: job.commands) + build.job = job + build.save + build end end end |