From 914cfbd94d79641cee7dc54e53dd92dec0f3ceb8 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Mon, 17 Jun 2019 13:25:05 +0200 Subject: [PATCH] Reword error on invalid match state --- app/services/user_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/user_service.rb b/app/services/user_service.rb index 990fc0a..f950f0e 100644 --- a/app/services/user_service.rb +++ b/app/services/user_service.rb @@ -19,7 +19,7 @@ class UserService raise UserServiceError, 'The given team is not involved in the given match' unless match.teams.include? team end raise UserServiceError, 'This user already created a bet on this match' if match.bets.map(&:user).include? @user - raise UserServiceError, "Betting is not supported while match is #{match.state}" \ + raise UserServiceError, "Betting is not allowed while match is #{match.state}" \ unless %w[not_ready not_started].include? match.state end end