添加日志
This commit is contained in:
parent
66640b5a14
commit
da19d8a7fd
|
|
@ -251,11 +251,14 @@ class GamesController < ApplicationController
|
|||
@answer = challenge.answer
|
||||
if @game.answer_open
|
||||
@viewed = 1
|
||||
logger.info("1 is #{@viewed}")
|
||||
else
|
||||
if @score >= 0
|
||||
@viewed = 2
|
||||
logger.info("2 is #{@viewed}")
|
||||
else
|
||||
@viewed = 3
|
||||
logger.info("3 is #{@viewed}")
|
||||
end
|
||||
end
|
||||
respond_to do |format|
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
class SyncIsPublicToGame < ActiveRecord::Migration
|
||||
def change
|
||||
# outputs = Output.all
|
||||
# outputs.each do |output|
|
||||
# puts("##{output}")
|
||||
# challenge = output.game.try(:challenge)
|
||||
# puts ("challenge id is #{challenge.id unless challenge.blank?}")
|
||||
# unless challenge.blank?
|
||||
# test_set = TestSet.where(:challenge_id => challenge.id, :position => output.test_set_position).first
|
||||
# puts ("#{test_set.id unless test_set.blank?}")
|
||||
# output.update_column(:is_public, test_set.is_public) unless test_set.blank?
|
||||
# end
|
||||
# end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in New Issue