diff options
author | Jeroen Nijhof <jeroen@jeroennijhof.nl> | 2016-01-06 14:55:44 +0100 |
---|---|---|
committer | Jeroen Nijhof <jeroen@jeroennijhof.nl> | 2016-01-06 14:55:44 +0100 |
commit | 9b28220f8874c7ab342286e74f0b21895a2dd777 (patch) | |
tree | 0b2ec2d97a95796893778623adabb975e0224b64 /app/models/ci/variable.rb | |
parent | d4690af8bc283c402e49cb8b3056c7de9d57e886 (diff) | |
parent | 8b39b8cd54bb73b485ee6ea7fc5d3bbfbe07cd5d (diff) | |
download | gitlab-ce-9b28220f8874c7ab342286e74f0b21895a2dd777.tar.gz |
Merge gitlab.com:gitlab-org/gitlab-ce
Diffstat (limited to 'app/models/ci/variable.rb')
-rw-r--r-- | app/models/ci/variable.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/ci/variable.rb b/app/models/ci/variable.rb index 7a542802fa6..56759d3e50f 100644 --- a/app/models/ci/variable.rb +++ b/app/models/ci/variable.rb @@ -1,6 +1,6 @@ # == Schema Information # -# Table name: variables +# Table name: ci_variables # # id :integer not null, primary key # project_id :integer not null @@ -15,10 +15,10 @@ module Ci class Variable < ActiveRecord::Base extend Ci::Model - belongs_to :project, class_name: 'Ci::Project' + belongs_to :project, class_name: '::Project', foreign_key: :gl_project_id validates_presence_of :key - validates_uniqueness_of :key, scope: :project_id + validates_uniqueness_of :key, scope: :gl_project_id attr_encrypted :value, mode: :per_attribute_iv_and_salt, key: Gitlab::Application.secrets.db_key_base end |