Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2017-06-02 15:29:30 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2017-06-07 18:36:55 +0300
commit5819ca1a249d1daf3b4feb655c217c98a1b70225 (patch)
tree799459af23e425921e5368693ee3d0a258c426bb /app/models/deployment.rb
parent44d65c36dbe2f38eacb1858a99996c025b755937 (diff)
Added Cop to blacklist polymorphic associations
One should really use a separate table instead of using polymorphic associations. See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11168 for more information.
Diffstat (limited to 'app/models/deployment.rb')
-rw-r--r--app/models/deployment.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/deployment.rb b/app/models/deployment.rb
index 304179c0a97..85e7901dfee 100644
--- a/app/models/deployment.rb
+++ b/app/models/deployment.rb
@@ -4,7 +4,7 @@ class Deployment < ActiveRecord::Base
belongs_to :project, required: true, validate: true
belongs_to :environment, required: true, validate: true
belongs_to :user
- belongs_to :deployable, polymorphic: true
+ belongs_to :deployable, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations
validates :sha, presence: true
validates :ref, presence: true