diff options
| author | Clement Ho <clemmakesapps@gmail.com> | 2018-03-01 22:33:29 +0000 |
|---|---|---|
| committer | Clement Ho <clemmakesapps@gmail.com> | 2018-03-01 22:33:29 +0000 |
| commit | b112a33b98c657b1d2838c14d598a291a14565e0 (patch) | |
| tree | a37cc22491baf419a15b81918ee07c2fd0d8f2da /app/models/ci/variable.rb | |
| parent | 4441ca4ba7bf6c4a68574d018d2bf48e45326654 (diff) | |
| parent | 5c4eace67f188da436b3b380a0125d053b29422a (diff) | |
| download | gitlab-ce-sentiment-analysis.tar.gz | |
Merge branch 'master' into 'sentiment-analysis'sentiment-analysis
# Conflicts:
# app/assets/javascripts/notes/components/comment_form.vue
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 |
