Add owner_username attribute to Tournament

displaying the username of the user owning the tournament
This commit is contained in:
Thor77 2018-12-11 15:19:27 +01:00
parent 32c012af32
commit d1bc3de6b0
1 changed files with 4 additions and 0 deletions

View File

@ -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