diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2018-02-27 18:43:51 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2018-02-27 18:43:51 +0000 |
commit | c066dc6c37ab678bcea0c3bed1503b2d4486b6e1 (patch) | |
tree | d01e9d1ed915d58bd00b564e99584ac59460476b /app/models/ci/variable.rb | |
parent | b17912a8af08ada189fc4dc2f864d619ca0bed86 (diff) | |
parent | d4867c518f2d72125c619c191fa9577dabb1ae9a (diff) | |
download | gitlab-ce-remove-snippets-bundle.tar.gz |
Merge branch 'master' into 'remove-snippets-bundle'remove-snippets-bundle
# Conflicts:
# config/webpack.config.js
Diffstat (limited to 'app/models/ci/variable.rb')
-rw-r--r-- | app/models/ci/variable.rb | 5 |
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 |