BigW Consortium Gitlab

variable.rb 294 Bytes
Newer Older
1 2
module Ci
  class Variable < ActiveRecord::Base
3
    extend Gitlab::Ci::Model
Shinya Maeda committed
4
    include HasVariable
Shinya Maeda committed
5
    include Presentable
6

7
    belongs_to :project
8

9
    validates :key, uniqueness: { scope: [:project_id, :environment_scope] }
10

11
    scope :unprotected, -> { where(protected: false) }
12 13
  end
end