Update Party model to have summons
This commit is contained in:
parent
0117f0e629
commit
b44b8e9b70
2 changed files with 6 additions and 1 deletions
|
|
@ -2,4 +2,5 @@ class Party < ApplicationRecord
|
|||
##### ActiveRecord Associations
|
||||
belongs_to :user, optional: true
|
||||
has_many :weapons, foreign_key: "party_id", class_name: "GridWeapon"
|
||||
has_many :summons, foreign_key: "party_id", class_name: "GridSummon"
|
||||
end
|
||||
|
|
@ -2,6 +2,10 @@ object :party
|
|||
|
||||
attributes :id, :user_id, :shortcode
|
||||
|
||||
node :grid do |p|
|
||||
node :weapons do |p|
|
||||
partial('grid_weapons/base', :object => p.weapons)
|
||||
end
|
||||
|
||||
node :summons do |p|
|
||||
partial('grid_summons/base', :object => p.summons)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue