Receive and output job data in templates
This commit is contained in:
parent
c3566944cd
commit
cf132e20f5
3 changed files with 6 additions and 1 deletions
|
|
@ -118,6 +118,6 @@ class Api::V1::PartiesController < Api::V1::ApiController
|
|||
end
|
||||
|
||||
def party_params
|
||||
params.require(:party).permit(:user_id, :extra, :name, :description, :raid_id)
|
||||
params.require(:party).permit(:user_id, :extra, :name, :description, :raid_id, :job_id)
|
||||
end
|
||||
end
|
||||
|
|
@ -2,6 +2,7 @@ class Party < ApplicationRecord
|
|||
##### ActiveRecord Associations
|
||||
belongs_to :user, optional: true
|
||||
belongs_to :raid, optional: true
|
||||
belongs_to :job, optional: true
|
||||
|
||||
has_many :characters,
|
||||
foreign_key: "party_id",
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@ node :raid do |p|
|
|||
partial('raids/base', :object => p.raid)
|
||||
end
|
||||
|
||||
node :job do |p|
|
||||
partial('jobs/base', :object => p.job)
|
||||
end
|
||||
|
||||
node :characters do |p|
|
||||
partial('grid_characters/base', :object => p.characters)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue