From 5819ca1a249d1daf3b4feb655c217c98a1b70225 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Fri, 2 Jun 2017 14:29:30 +0200 Subject: 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. --- app/models/user_agent_detail.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/user_agent_detail.rb') diff --git a/app/models/user_agent_detail.rb b/app/models/user_agent_detail.rb index 0949c6ef083..2d05fdd3e54 100644 --- a/app/models/user_agent_detail.rb +++ b/app/models/user_agent_detail.rb @@ -1,5 +1,5 @@ class UserAgentDetail < ActiveRecord::Base - belongs_to :subject, polymorphic: true + belongs_to :subject, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations validates :user_agent, :ip_address, :subject_id, :subject_type, presence: true -- cgit v1.2.1