diff options
author | Kamil TrzciĆski <ayufan@ayufan.eu> | 2017-03-17 23:06:11 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-03-17 23:06:11 +0000 |
commit | 12dd5ac22110bc3327297232d96f2afebaefc5eb (patch) | |
tree | c1ec703f9c7072df5097ba70c3e4e7c132a44a83 /app/models/ci/variable.rb | |
parent | 94246c7aa01bd825953e6676f79aa9db51209822 (diff) | |
download | gitlab-ce-12dd5ac22110bc3327297232d96f2afebaefc5eb.tar.gz |
All CI offline migrations
Diffstat (limited to 'app/models/ci/variable.rb')
-rw-r--r-- | app/models/ci/variable.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/ci/variable.rb b/app/models/ci/variable.rb index 2c8698d8b5d..6c6586110c5 100644 --- a/app/models/ci/variable.rb +++ b/app/models/ci/variable.rb @@ -2,11 +2,11 @@ module Ci class Variable < ActiveRecord::Base extend Ci::Model - belongs_to :project, foreign_key: :gl_project_id + belongs_to :project validates :key, presence: true, - uniqueness: { scope: :gl_project_id }, + uniqueness: { scope: :project_id }, length: { maximum: 255 }, format: { with: /\A[a-zA-Z0-9_]+\z/, message: "can contain only letters, digits and '_'." } |