diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index f9623344b..120387361 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -119,7 +119,7 @@ class GamesController < ApplicationController def file_update @g = Gitlab.client - content = params[:content].strip + content = params[:content].try(:strip) code_file = @g.edit_file(@myshixun.gpid, :content => params[:content], :file_path => @path, :branch_name => @rev, :commit_message => "shixun exec") unless code_file.blank? render :json => {:success => "success"} diff --git a/app/views/games/_code_actions.html.erb b/app/views/games/_code_actions.html.erb index 97f89c4ad..10926f530 100644 --- a/app/views/games/_code_actions.html.erb +++ b/app/views/games/_code_actions.html.erb @@ -1,9 +1,7 @@ -<% if @game.status == 2 %> -