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

    belongs_to :group

    validates :key, uniqueness: { scope: :group_id }

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