dev_home
daiao 5 years ago
parent 900a863bf0
commit 85bf09ea47

@ -768,7 +768,7 @@ class GamesController < ApplicationController
# REDO:需要添加详细的说明
def cost_time
#return if @game.status >= 2
cost_time = (params[:time].to_i < 0 ? 0 : params[:time].to_i) + @game.cost_time.to_i
cost_time = params[:time].to_i < @game.cost_time ? (@game.cost_time+params[:time]) : params[:time].to_i
@game.update_attribute(:cost_time, cost_time)
end

@ -0,0 +1 @@
json.identifier @game.identifier
Loading…
Cancel
Save