From 33a05bdcf2ebc92e9fbc52ed4574b7baac003c2a Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 19 Nov 2019 20:24:06 +0800 Subject: [PATCH] 1 --- app/controllers/games_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 9c5087399..3f7a451fd 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -768,7 +768,7 @@ class GamesController < ApplicationController # REDO:需要添加详细的说明 def cost_time #return if @game.status >= 2 - cost_time = params[:time].to_i < @game.cost_time ? (@game.cost_time+params[:time]) : params[:time].to_i + cost_time = params[:time].to_i < @game.cost_time.to_i ? (@game.cost_time.to_i + params[:time].to_i) : params[:time].to_i @game.update_attribute(:cost_time, cost_time) end