From 8252621991331b31fd2d4b69efb5a010c25575b0 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 24 Mar 2017 17:38:56 +0800 Subject: [PATCH] =?UTF-8?q?code=E8=BD=ACjson=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/games_controller.rb | 2 +- app/models/game.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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