diff options
Diffstat (limited to 'app/models/ci/stage.rb')
-rw-r--r-- | app/models/ci/stage.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/ci/stage.rb b/app/models/ci/stage.rb index c49d088fe6b..e2103183247 100644 --- a/app/models/ci/stage.rb +++ b/app/models/ci/stage.rb @@ -20,6 +20,7 @@ module Ci scope :ordered, -> { order(position: :asc) } scope :in_pipelines, ->(pipelines) { where(pipeline: pipelines) } + scope :by_name, ->(names) { where(name: names) } with_options unless: :importing? do validates :project, presence: true |