about summary refs log tree commit diff
path: root/app/models/custom_filter.rb
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-19 20:19:40 -0500
committerGitHub <noreply@github.com>2023-02-20 02:19:40 +0100
commit597767a9f7ca846be9fbca826aba362f8387a60f (patch)
treec25188e552be7112fecc4654c0e25ed2ebd4768d /app/models/custom_filter.rb
parent8ef09813a2b46d99fe9c7e39beba2a68052c17d1 (diff)
Autofix Rubocop Rails/RedundantForeignKey (#23731)
Diffstat (limited to 'app/models/custom_filter.rb')
-rw-r--r--app/models/custom_filter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/custom_filter.rb b/app/models/custom_filter.rb
index 5a4a974be..b70e53bd5 100644
--- a/app/models/custom_filter.rb
+++ b/app/models/custom_filter.rb
@@ -33,8 +33,8 @@ class CustomFilter < ApplicationRecord
   enum action: [:warn, :hide], _suffix: :action
 
   belongs_to :account
-  has_many :keywords, class_name: 'CustomFilterKeyword', foreign_key: :custom_filter_id, inverse_of: :custom_filter, dependent: :destroy
-  has_many :statuses, class_name: 'CustomFilterStatus', foreign_key: :custom_filter_id, inverse_of: :custom_filter, dependent: :destroy
+  has_many :keywords, class_name: 'CustomFilterKeyword', inverse_of: :custom_filter, dependent: :destroy
+  has_many :statuses, class_name: 'CustomFilterStatus', inverse_of: :custom_filter, dependent: :destroy
   accepts_nested_attributes_for :keywords, reject_if: :all_blank, allow_destroy: true
 
   validates :title, :context, presence: true