diff options
author | Simon Knox <psimyn@gmail.com> | 2018-02-28 09:10:03 +1100 |
---|---|---|
committer | Simon Knox <psimyn@gmail.com> | 2018-02-28 09:10:03 +1100 |
commit | 7917f301b3d954adbe5bd594ec9a8620207311a4 (patch) | |
tree | bdeb4bb7e765c0ac8605abf85823188335e4dc48 /app/models/ci/variable.rb | |
parent | 8d33065349ef5e3fa0f22fad6b2164b2fbf978bc (diff) | |
parent | 074d3595f30644af031e10d60c4fdbd7c67bcd2b (diff) | |
download | gitlab-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.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 |