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

    belongs_to :project

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

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