summaryrefslogtreecommitdiff
path: root/app/models/ci/group_variable.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/ci/group_variable.rb')
-rw-r--r--app/models/ci/group_variable.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/models/ci/group_variable.rb b/app/models/ci/group_variable.rb
new file mode 100644
index 00000000000..f64bc245a67
--- /dev/null
+++ b/app/models/ci/group_variable.rb
@@ -0,0 +1,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