From cea66cbe1bab2123ed7d8785c88539033a3afcfa Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 26 Mar 2020 22:53:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E7=B4=AF=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 614008112..75e2827a2 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -785,7 +785,7 @@ class GamesController < ApplicationController # REDO:需要添加详细的说明 def cost_time #return if @game.status >= 2 - cost_time = params[:time].to_i < @game.cost_time.to_i ? (@game.cost_time.to_i + params[:time].to_i) : params[:time].to_i + cost_time = params[:time].to_i < @game.cost_time.to_i ? (@game.cost_time.to_i) : params[:time].to_i @game.update_attribute(:cost_time, cost_time) end From 03d1fab1132be9ca9898a8c494251532f9dc87ec Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 26 Mar 2020 22:55:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=B8=8D=E8=83=BD=E5=8E=BB=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 75e2827a2..614008112 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -785,7 +785,7 @@ class GamesController < ApplicationController # REDO:需要添加详细的说明 def cost_time #return if @game.status >= 2 - cost_time = params[:time].to_i < @game.cost_time.to_i ? (@game.cost_time.to_i) : 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