diff --git a/app/serializers/tournament_serializer.rb b/app/serializers/tournament_serializer.rb index 9805797..25582e1 100644 --- a/app/serializers/tournament_serializer.rb +++ b/app/serializers/tournament_serializer.rb @@ -1,7 +1,8 @@ # frozen_string_literal: true class TournamentSerializer < SimpleTournamentSerializer - attributes :description + attributes :description, :playoff_teams_amount, + :instant_finalists_amount, :intermediate_round_participants_amount has_many :stages has_many :teams diff --git a/db/migrate/0000_create_schema.rb b/db/migrate/0000_create_schema.rb index f1d4a3f..14ffb52 100644 --- a/db/migrate/0000_create_schema.rb +++ b/db/migrate/0000_create_schema.rb @@ -52,6 +52,8 @@ class CreateSchema < ActiveRecord::Migration[5.2] t.string :description t.boolean :public, default: true t.integer :playoff_teams_amount + t.integer :instant_finalists_amount, default: 0 + t.integer :intermediate_round_participants_amount, default: 0 # relation to owner t.belongs_to :user, index: true, null: false, foreign_key: { on_delete: :cascade }