Fix Rails/InverseOf cop (#24732)

This commit is contained in:
Matt Jankowski 2023-04-30 08:06:53 -04:00 committed by GitHub
parent 6b95aaaa65
commit af824db398
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 33 additions and 35 deletions

View file

@ -12,7 +12,7 @@
class FollowRecommendation < ApplicationRecord
self.primary_key = :account_id
belongs_to :account_summary, foreign_key: :account_id
belongs_to :account_summary, foreign_key: :account_id, inverse_of: false
belongs_to :account
scope :localized, ->(locale) { joins(:account_summary).merge(AccountSummary.localized(locale)) }