code转json格式

This commit is contained in:
huang 2017-03-24 17:38:56 +08:00
parent f2e337fb12
commit 8252621991
2 changed files with 2 additions and 2 deletions

View File

@ -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}"}

View File

@ -1,7 +1,7 @@
class Game < ActiveRecord::Base
# stauts 0: can exe 1doing 2successed 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