diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 6dc7853fc..33a34f268 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -98,7 +98,7 @@ class GamesController < ApplicationController testCode.store("testCode_#{index}",test_set.try(:output)) end end - + testCode = testCode.to_json jenkins_shixuns = Redmine::Configuration['jenkins_shixuns'] step = @game.stage params = {:jobName => "#{jobName}", :taskId => "#{taskId}", :step => "#{step}", :gitUrl => "#{gitUrl}", :testCode => "#{testCode}"} diff --git a/app/models/game.rb b/app/models/game.rb index 400adddb4..e7bd9b6dc 100644 --- a/app/models/game.rb +++ b/app/models/game.rb @@ -1,7 +1,7 @@ class Game < ActiveRecord::Base # stauts 0: can exe 1:doing 2:successed 3:locked default_scope :order => 'stage' - attr_accessible :description, :myshixun_id, :stage, :subject, :user_id, :status, :ready_knowledge, :task_pass, :answer, :score, :final_score + attr_accessible :description, :myshixun_id, :stage, :subject, :user_id, :status, :ready_knowledge, :task_pass, :answer, :score, :final_score, :path belongs_to :myshixun,:touch=> true belongs_to :user has_many :outputs, :dependent => :destroy