Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-03-17 14:17:40 +0300
committerMatija Čupić <matteeyah@gmail.com>2018-03-17 18:33:36 +0300
commit53915c5c54c06182717b457375ae771ee01558fd (patch)
treee270fe3c239f6fd91871b5157665abfe2aa8867b /app/models/ci/variable.rb
parent763c82f0b304362be71ca82e551381609db19bf8 (diff)
Alias secret_key and secret_value to key and value
Diffstat (limited to 'app/models/ci/variable.rb')
-rw-r--r--app/models/ci/variable.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/ci/variable.rb b/app/models/ci/variable.rb
index 7c71291de84..bcad55f115f 100644
--- a/app/models/ci/variable.rb
+++ b/app/models/ci/variable.rb
@@ -6,6 +6,9 @@ module Ci
belongs_to :project
+ alias_attribute :secret_key, :key
+ alias_attribute :secret_value, :value
+
validates :key, uniqueness: {
scope: [:project_id, :environment_scope],
message: "(%{value}) has already been taken"