Add counter_cache flag to GridWeapon
This commit is contained in:
parent
ff85de2f86
commit
72c144ef65
1 changed files with 2 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
class GridWeapon < ApplicationRecord
|
||||
belongs_to :party
|
||||
belongs_to :party,
|
||||
counter_cache: :weapons_count
|
||||
|
||||
belongs_to :weapon_key1, class_name: 'WeaponKey', foreign_key: :weapon_key1_id, optional: true
|
||||
belongs_to :weapon_key2, class_name: 'WeaponKey', foreign_key: :weapon_key2_id, optional: true
|
||||
|
|
|
|||
Loading…
Reference in a new issue