Update Party model to have summons

This commit is contained in:
Justin Edmund 2020-10-18 22:25:17 -07:00
parent 0117f0e629
commit b44b8e9b70
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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