- Show flat representation of raid group in RaidBlueprint's nested view - Show nested representation of raid in RaidGroupBlueprint's full view
23 lines
472 B
Ruby
23 lines
472 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Api
|
|
module V1
|
|
class RaidGroupBlueprint < ApiBlueprint
|
|
view :flat do
|
|
field :name do |group|
|
|
{
|
|
en: group.name_en,
|
|
ja: group.name_jp
|
|
}
|
|
end
|
|
|
|
fields :difficulty, :order, :section, :extra, :guidebooks, :hl
|
|
end
|
|
|
|
view :full do
|
|
include_view :flat
|
|
association :raids, blueprint: RaidBlueprint, view: :nested
|
|
end
|
|
end
|
|
end
|
|
end
|