Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-05-12 21:37:09 +0300
committerShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-05-30 17:55:08 +0300
commitf8cb5fd65a8ed00f38368a6a050c940e72cc6f3e (patch)
tree4ec38d79506a154e2ad79728a8df3371e256047d /app
parent8743f765abc2281c664792f5016747f54d0fb7aa (diff)
Add own! method on PipleineSchedule
Diffstat (limited to 'app')
-rw-r--r--app/models/ci/pipeline_schedule.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/ci/pipeline_schedule.rb b/app/models/ci/pipeline_schedule.rb
index 58cf62513d3..623275b7269 100644
--- a/app/models/ci/pipeline_schedule.rb
+++ b/app/models/ci/pipeline_schedule.rb
@@ -24,6 +24,10 @@ module Ci
owner == current_user
end
+ def own!(user)
+ update!(owner: user)
+ end
+
def inactive?
!active?
end