Make has_many readable
This commit is contained in:
parent
c7196f7c79
commit
e6a09ab29b
1 changed files with 14 additions and 3 deletions
|
|
@ -3,9 +3,20 @@ class Party < ApplicationRecord
|
|||
belongs_to :user, optional: true
|
||||
belongs_to :raid, optional: true
|
||||
|
||||
has_many :characters, foreign_key: "party_id", class_name: "GridCharacter", dependent: :destroy
|
||||
has_many :weapons, foreign_key: "party_id", class_name: "GridWeapon", dependent: :destroy
|
||||
has_many :summons, foreign_key: "party_id", class_name: "GridSummon", dependent: :destroy
|
||||
has_many :characters,
|
||||
foreign_key: "party_id",
|
||||
class_name: "GridCharacter",
|
||||
dependent: :destroy
|
||||
|
||||
has_many :weapons,
|
||||
foreign_key: "party_id",
|
||||
class_name: "GridWeapon",
|
||||
dependent: :destroy
|
||||
|
||||
has_many :summons,
|
||||
foreign_key: "party_id",
|
||||
class_name: "GridSummon",
|
||||
dependent: :destroy
|
||||
has_many :favorites
|
||||
|
||||
attr_accessor :favorited
|
||||
|
|
|
|||
Loading…
Reference in a new issue