diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 35d7aa281..beb32677d 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -94,11 +94,14 @@ class GamesController < ApplicationController @g = Gitlab.client content = params[:content].strip @g.edit_file(@myshixun.gpid, :content => params[:content], :file_path => @path, :branch_name => @rev, :commit_message => "shixun exec") + render :json => {:success => "success"} +=begin respond_to do |format| - format.js{redirect_to entry_myshixun_game_path(@game, :myshixun_id => @myshixun, :path => @path)} + format.js end rescue Exception => e puts e.message +=end end # json调用,显示左边的隐藏具体详情@game 字段 msg diff --git a/app/views/games/_file_edit_form.html.erb b/app/views/games/_file_edit_form.html.erb index 107088eca..8501a6c3f 100644 --- a/app/views/games/_file_edit_form.html.erb +++ b/app/views/games/_file_edit_form.html.erb @@ -1,5 +1,5 @@