summaryrefslogtreecommitdiff
path: root/app/models/label_link.rb
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2017-06-02 14:29:30 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2017-06-07 17:36:55 +0200
commit5819ca1a249d1daf3b4feb655c217c98a1b70225 (patch)
tree799459af23e425921e5368693ee3d0a258c426bb /app/models/label_link.rb
parent44d65c36dbe2f38eacb1858a99996c025b755937 (diff)
downloadgitlab-ce-5819ca1a249d1daf3b4feb655c217c98a1b70225.tar.gz
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/label_link.rb')
-rw-r--r--app/models/label_link.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/label_link.rb b/app/models/label_link.rb
index 51b5c2b1f4c..d68e1f54317 100644
--- a/app/models/label_link.rb
+++ b/app/models/label_link.rb
@@ -1,7 +1,7 @@
class LabelLink < ActiveRecord::Base
include Importable
- belongs_to :target, polymorphic: true
+ belongs_to :target, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations
belongs_to :label
validates :target, presence: true, unless: :importing?