diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-12 21:37:09 +0300 |
---|---|---|
committer | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-30 17:55:08 +0300 |
commit | f8cb5fd65a8ed00f38368a6a050c940e72cc6f3e (patch) | |
tree | 4ec38d79506a154e2ad79728a8df3371e256047d /app/models/ci | |
parent | 8743f765abc2281c664792f5016747f54d0fb7aa (diff) |
Add own! method on PipleineSchedule
Diffstat (limited to 'app/models/ci')
-rw-r--r-- | app/models/ci/pipeline_schedule.rb | 4 |
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 |