Add owner_username attribute to Tournament
displaying the username of the user owning the tournament
This commit is contained in:
parent
32c012af32
commit
d1bc3de6b0
|
|
@ -4,4 +4,8 @@ class TournamentSerializer < SimpleTournamentSerializer
|
||||||
attributes :description
|
attributes :description
|
||||||
has_many :stages
|
has_many :stages
|
||||||
has_many :teams
|
has_many :teams
|
||||||
|
|
||||||
|
attribute :owner_username do
|
||||||
|
object.owner.username
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue