Add tournament serializers
SimpleTournamentSerializer excludes relationships and should be used for listings
This commit is contained in:
parent
fecdb7db2d
commit
d1f66b18d4
|
|
@ -0,0 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class SimpleTournamentSerializer < ApplicationSerializer
|
||||||
|
attributes :name, :code, :description, :public
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class TournamentSerializer < SimpleTournamentSerializer
|
||||||
|
has_many :teams
|
||||||
|
has_many :stages
|
||||||
|
end
|
||||||
Loading…
Reference in New Issue