summaryrefslogtreecommitdiff
path: root/app/models/ci/variable.rb
diff options
context:
space:
mode:
authorSimon Knox <psimyn@gmail.com>2018-02-28 09:10:03 +1100
committerSimon Knox <psimyn@gmail.com>2018-02-28 09:10:03 +1100
commit7917f301b3d954adbe5bd594ec9a8620207311a4 (patch)
treebdeb4bb7e765c0ac8605abf85823188335e4dc48 /app/models/ci/variable.rb
parent8d33065349ef5e3fa0f22fad6b2164b2fbf978bc (diff)
parent074d3595f30644af031e10d60c4fdbd7c67bcd2b (diff)
downloadgitlab-ce-acet-mr-notes-index.tar.gz
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into acet-mr-notes-indexacet-mr-notes-index
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