Add counter caches to party
This commit is contained in:
parent
b86f3a90f6
commit
bd53af4339
1 changed files with 3 additions and 0 deletions
|
|
@ -60,18 +60,21 @@ class Party < ApplicationRecord
|
|||
has_many :characters,
|
||||
foreign_key: 'party_id',
|
||||
class_name: 'GridCharacter',
|
||||
counter_cache: true,
|
||||
dependent: :destroy,
|
||||
inverse_of: :party
|
||||
|
||||
has_many :weapons,
|
||||
foreign_key: 'party_id',
|
||||
class_name: 'GridWeapon',
|
||||
counter_cache: true,
|
||||
dependent: :destroy,
|
||||
inverse_of: :party
|
||||
|
||||
has_many :summons,
|
||||
foreign_key: 'party_id',
|
||||
class_name: 'GridSummon',
|
||||
counter_cache: true,
|
||||
dependent: :destroy,
|
||||
inverse_of: :party
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue