summaryrefslogtreecommitdiff
path: root/app/models/ci/group_variable.rb
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-03-17 12:17:40 +0100
committerMatija Čupić <matteeyah@gmail.com>2018-03-17 16:33:36 +0100
commit53915c5c54c06182717b457375ae771ee01558fd (patch)
treee270fe3c239f6fd91871b5157665abfe2aa8867b /app/models/ci/group_variable.rb
parent763c82f0b304362be71ca82e551381609db19bf8 (diff)
downloadgitlab-ce-53915c5c54c06182717b457375ae771ee01558fd.tar.gz
Alias secret_key and secret_value to key and value
Diffstat (limited to 'app/models/ci/group_variable.rb')
-rw-r--r--app/models/ci/group_variable.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/ci/group_variable.rb b/app/models/ci/group_variable.rb
index 1dd0e050ba9..65399557289 100644
--- a/app/models/ci/group_variable.rb
+++ b/app/models/ci/group_variable.rb
@@ -6,6 +6,9 @@ module Ci
belongs_to :group
+ alias_attribute :secret_key, :key
+ alias_attribute :secret_value, :value
+
validates :key, uniqueness: {
scope: :group_id,
message: "(%{value}) has already been taken"