diff options
author | Phil Hughes <me@iamphill.com> | 2018-02-27 10:03:19 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-02-27 10:03:19 +0000 |
commit | 27ca41ac3c9442312f440d78f70628d0ac6826ff (patch) | |
tree | efde2a9ba11741c94edf288cdae18cd4379a5515 /app/models/ci/variable.rb | |
parent | 9167989f3e9a8e5ee4c84600102e67d5799a9feb (diff) | |
parent | a4885b8f37602c399efff028b0a733ef80fbe7ab (diff) | |
download | gitlab-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.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 |