From 2d87bfb2ae457c1e7c837ec8ea0ac9815eb002cc Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 26 Apr 2017 17:01:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E7=9A=84=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/bigdate.iml | 100 +++++++++++------------ app/controllers/games_controller.rb | 2 +- app/views/games/_file_edit_form.html.erb | 4 +- 3 files changed, 53 insertions(+), 53 deletions(-) diff --git a/.idea/bigdate.iml b/.idea/bigdate.iml index 54164e1bd..def4eded2 100644 --- a/.idea/bigdate.iml +++ b/.idea/bigdate.iml @@ -13,46 +13,28 @@ - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - + + + + + + + + + @@ -77,28 +59,46 @@ - - + - - - - - + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index df1bc8d15..4d7308362 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -134,7 +134,7 @@ class GamesController < ApplicationController game_challenge = @game.challenge gitUrl = git_repository_url(@myshixun, "Myshixun") gitUrl = Base64.encode64(gitUrl) - taskId = params[:id] + taskId = @game.id jobName = "myshixun_#{@myshixun.id}" ActiveRecord::Base.transaction do @game.update_attributes!(:status => 1) diff --git a/app/views/games/_file_edit_form.html.erb b/app/views/games/_file_edit_form.html.erb index 723aa0038..bd6a1046e 100644 --- a/app/views/games/_file_edit_form.html.erb +++ b/app/views/games/_file_edit_form.html.erb @@ -2,7 +2,7 @@ .CodeMirror{line-height: 1.2; font-size: 14px} -
+
  • @@ -42,7 +42,7 @@ $("#save_status").html("保存中..."); $.ajax({ type: "POST", - url: '<%= file_update_myshixun_game_path(@myshixun.id, @game.id, :path => @path) %>', + url: '<%= file_update_myshixun_game_path(@game, :myshixun_id => @myshixun, :path => @path) %>', data:{ content: $('#challenge-answer-edit-small').val()}, success: function(data){ $("#save_status").html("已保存");