summaryrefslogtreecommitdiff
path: root/app/models/ci/variable.rb
blob: cf0fe04ddafe643bda2f410b1232cadf9acd7bba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module Ci
  class Variable < ActiveRecord::Base
    extend Ci::Model
    include HasVariable
    include Presentable

    belongs_to :project

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

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