0
0
Fork 0

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

@ -19,7 +19,7 @@ class Appeal < ApplicationRecord
MAX_STRIKE_AGE = 20.days
belongs_to :account
belongs_to :strike, class_name: 'AccountWarning', foreign_key: 'account_warning_id'
belongs_to :strike, class_name: 'AccountWarning', foreign_key: 'account_warning_id', inverse_of: :appeal
belongs_to :approved_by_account, class_name: 'Account', optional: true
belongs_to :rejected_by_account, class_name: 'Account', optional: true