summaryrefslogtreecommitdiff
path: root/app/models/ci/variable.rb
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-02-27 10:03:19 +0000
committerPhil Hughes <me@iamphill.com>2018-02-27 10:03:19 +0000
commit27ca41ac3c9442312f440d78f70628d0ac6826ff (patch)
treeefde2a9ba11741c94edf288cdae18cd4379a5515 /app/models/ci/variable.rb
parent9167989f3e9a8e5ee4c84600102e67d5799a9feb (diff)
parenta4885b8f37602c399efff028b0a733ef80fbe7ab (diff)
downloadgitlab-ce-refactor-commit-show.tar.gz
Merge branch 'master' into 'refactor-commit-show'refactor-commit-show
# Conflicts: # config/webpack.config.js
Diffstat (limited to 'app/models/ci/variable.rb')
-rw-r--r--app/models/ci/variable.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/ci/variable.rb b/app/models/ci/variable.rb
index 67d3ec81b6f..7c71291de84 100644
--- a/app/models/ci/variable.rb
+++ b/app/models/ci/variable.rb
@@ -6,7 +6,10 @@ module Ci
belongs_to :project
- validates :key, uniqueness: { scope: [:project_id, :environment_scope] }
+ validates :key, uniqueness: {
+ scope: [:project_id, :environment_scope],
+ message: "(%{value}) has already been taken"
+ }
scope :unprotected, -> { where(protected: false) }
end