gitlab-org--gitlab-foss/app/models/ci/variable.rb

13 lines
262 B
Ruby
Raw Normal View History

2015-08-26 01:42:46 +00:00
module Ci
class Variable < ActiveRecord::Base
extend Ci::Model
2017-06-26 13:03:34 +00:00
include HasVariable
2017-03-17 23:06:11 +00:00
belongs_to :project
2015-08-26 01:42:46 +00:00
validates :key, uniqueness: { scope: [:project_id, :environment_scope] }
2015-08-26 01:42:46 +00:00
scope :unprotected, -> { where(protected: false) }
2015-08-26 01:42:46 +00:00
end
end