Add relation to Party and output in Blueprint

This commit is contained in:
Justin Edmund 2023-01-24 02:38:09 -08:00
parent 7d142ada54
commit 404720d259
2 changed files with 7 additions and 0 deletions

View file

@ -64,6 +64,8 @@ module Api
include_view :characters
include_view :job_skills
association :accessory,
blueprint: JobAccessoryBlueprint
fields :description, :charge_attack, :button_count, :turn_count, :chain_count
end

View file

@ -16,6 +16,11 @@ class Party < ApplicationRecord
belongs_to :raid, optional: true
belongs_to :job, optional: true
belongs_to :accessory,
foreign_key: 'accessory_id',
class_name: 'JobAccessory',
optional: true
belongs_to :skill0,
foreign_key: 'skill0_id',
class_name: 'JobSkill',