Convert integer parameters to actual integers
Apparently rails thinks this is the way to do it.
This commit is contained in:
parent
3e04584e9f
commit
e936fd40b2
|
|
@ -124,9 +124,9 @@ class TournamentsController < ApplicationController
|
|||
def validate_update_params
|
||||
return if only_playoff_teams_amount_changed
|
||||
|
||||
playoff_teams_amount = params['playoff_teams_amount'] || @tournament.playoff_teams_amount
|
||||
instant_finalists_amount = params['instant_finalists_amount'] || @tournament.instant_finalists_amount
|
||||
intermediate_round_participants_amount = params['intermediate_round_participants_amount'] ||
|
||||
playoff_teams_amount = params['playoff_teams_amount'].to_i || @tournament.playoff_teams_amount
|
||||
instant_finalists_amount = params['instant_finalists_amount'].to_i || @tournament.instant_finalists_amount
|
||||
intermediate_round_participants_amount = params['intermediate_round_participants_amount'].to_i ||
|
||||
@tournament.intermediate_round_participants_amount
|
||||
|
||||
return if instant_finalists_amount + (intermediate_round_participants_amount / 2) ==
|
||||
|
|
|
|||
Loading…
Reference in New Issue